]> wimlib.net Git - wimlib/commit
Clean up inode alias tracking
authorEric Biggers <ebiggers3@gmail.com>
Sat, 24 Jan 2015 16:20:12 +0000 (10:20 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 24 Jan 2015 16:50:58 +0000 (10:50 -0600)
commitb5fae0e5ddac332b25856e3df7556aa3ee7f69fb
treefe15810641d4ee4265715113cfae86a3d4382c88
parent814c6f33ee61315286430e5f0044a40061e94b82
Clean up inode alias tracking

New helper functions:

- d_associate()
- d_disassociate()

i_nlink, d_inode, and i_dentry are no longer changed outside of these
functions.  We maintain the invariants:

i_nlink == list_size(&i_dentry) == # of d_inode references

put_inode() is removed; free_inode() is now private to inode.c.

This fixes at least one bug: when freeing a dentry, it was not being
deleted from the inode's dentry list.
include/wimlib/inode.h
src/dentry.c
src/inode.c
src/inode_fixup.c
src/inode_table.c
src/mount_image.c