]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
VFS: fix recent breakage of FS_REVAL_DOT
authorNeil Brown <neilb@suse.de>
Mon, 24 May 2010 06:57:56 +0000 (16:57 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:21:55 +0000 (11:21 -0700)
commitb55e34571e4db0b98fe1ba0fceeed734e2eb5c33
tree5c2e68c21977bfefd17592df040e8d6ec25c4131
parent9521ba4ae1028e06707b86050fe9e204bae3d818
VFS: fix recent breakage of FS_REVAL_DOT

commit 176306f59ac7a35369cbba87aff13e14c5916074 upstream.

Commit 1f36f774b22a0ceb7dd33eca626746c81a97b6a5 broke FS_REVAL_DOT semantics.

In particular, before this patch, the command
   ls -l
in an NFS mounted directory would always check if the directory on the server
had changed and if so would flush and refill the pagecache for the dir.
After this patch, the same "ls -l" will repeatedly return stale date until
the cached attributes for the directory time out.

The following patch fixes this by ensuring the d_revalidate is called by
do_last when "." is being looked-up.
link_path_walk has already called d_revalidate, but in that case LOOKUP_OPEN
is not set so nfs_lookup_verify_inode chooses not to do any validation.

The following patch restores the original behaviour.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/namei.c