[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m18wdknudi.fsf@fess.ebiederm.org>
Date: Thu, 03 Dec 2009 03:56:41 -0800
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Miklos Szeredi <miklos@...redi.hu>
Cc: jlayton@...hat.com, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, jamie@...reable.org, pavel@....cz,
viro@...IV.linux.org.uk, duaneg@...da.com
Subject: Re: [PATCH 2/2] vfs: force reval on dentry of bind mounted files on FS_REVAL_DOT filesystems
Miklos Szeredi <miklos@...redi.hu> writes:
> On Thu, 03 Dec 2009, Eric W. Biederman wrote:
>> > The only worry I have is that this adds an extra branch in a very hot
>> > codepath (do_lookup). An error can't be returned, as you note, and
>> > for bind mounted directories d_invalidate() will not succeed: the
>> > directory is busy, it's referenced by the mount.
>>
>> Not true. d_mountpoint is false, so d_invalidate can succeed.
>
> Have a look at the code. d_invalidate() doesn't check for a
> mountpoint, it checks the refcount. It needs to keep the directory
> dentry hashed if it's in any way reachable other than from the cache
> (file descriptor, cwd, mount, etc).
Ah. I thought you were thinking about the mandatory have_submounts()
check in dentry->d_op->d_revalidate().
I expect the generic d_invalidate will simply hit the:
spin_lock(&dcache_lock);
if (d_unhashed(dentry)) {
spin_unlock(&dcache_lock);
return 0;
}
After the distributed filesystem has called d_drop in
dentry->d_op->d_revalidate (when appropriate.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists