diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-05-21 17:30:19 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:12:01 -0400 |
commit | 16b1c1cd71176ab0a76b26818fbf12db9183ed57 (patch) | |
tree | da4ab8077cc3d9dce5b6ec2d003074cba3841446 /include/linux | |
parent | 50ee93afcaa970620d1fb5a9894109a2ab152868 (diff) | |
download | linux-stable-16b1c1cd71176ab0a76b26818fbf12db9183ed57.tar.gz linux-stable-16b1c1cd71176ab0a76b26818fbf12db9183ed57.tar.bz2 linux-stable-16b1c1cd71176ab0a76b26818fbf12db9183ed57.zip |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/errno.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/errno.h b/include/linux/errno.h index 2d09bfa5c262..e0de516374da 100644 --- a/include/linux/errno.h +++ b/include/linux/errno.h @@ -17,6 +17,7 @@ #define ENOIOCTLCMD 515 /* No ioctl command */ #define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ #define EPROBE_DEFER 517 /* Driver requests probe retry */ +#define EOPENSTALE 518 /* open found a stale dentry */ /* Defined for the NFSv3 protocol */ #define EBADHANDLE 521 /* Illegal NFS file handle */ |