]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: retry last component if opening stale dentry
authorMiklos Szeredi <mszeredi@suse.cz>
Mon, 21 May 2012 15:30:19 +0000 (17:30 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 1 Jun 2012 16:12:01 +0000 (12:12 -0400)
commit8d74ff65fbfa9150cad86e779de3750952b3340b
treeda4ab8077cc3d9dce5b6ec2d003074cba3841446
parentd53c9f9e8548d3e3ff816b05574ae149cd7668a3
vfs: retry last component if opening stale dentry

NFS optimizes away d_revalidates for last component of open.  This means that
open itself can find the dentry stale.

This patch allows the filesystem to return EOPENSTALE and the VFS will retry the
lookup on just the last component if possible.

If the lookup was done using RCU mode, including the last component, then this
is not possible since the parent dentry is lost.  In this case fall back to
non-RCU lookup.  Currently this is not used since NFS will always leave RCU
mode.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
include/linux/errno.h