--On Tuesday, September 06, 2005 07:44:26 PM -0400 chas williams - CONTRACTOR <[EMAIL PROTECTED]> wrote:

ergo the new root inode should not have any existing lookups/references
so d_count for
/afs should become 1.
As you are re-using the existing dentry, you are pretending that there is no "new" root inode. Sure, you are changing pointers behind the kernel's back, but all the references to that dentry still exist, and if you set the d_count to 1, it could underflow. or worse.

And in case my point still doesn't make sense, I'll try again:

most references to inodes are not direct. Instead, things like

a) sb->s_root
b) fs_struct->pwd
c) file->f_dentry

are all dentry pointers and all take references on the dentry, and let the dentry hold the reference on the inode. Since you aren't making all the references to the old root go away, you cannot change the dentry's refcount




Attachment: p7sA9cbi8xIJu.p7s
Description: S/MIME cryptographic signature

Reply via email to