aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-07-24 14:27:11 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-07-26 16:25:25 -0400
commit3825827ebf9973600347b16e848f3de52262ab6b (patch)
tree8867727645ca75ab917958561ee91006f0ff6805 /fs/nfs/dir.c
parentNFS: Fix excessive attribute revalidation in nfs_execute_ok() (diff)
downloadlinux-dev-3825827ebf9973600347b16e848f3de52262ab6b.tar.xz
linux-dev-3825827ebf9973600347b16e848f3de52262ab6b.zip
NFS: More excessive attribute revalidation in nfs_execute_ok()
execute_ok() will only check the mode bits if the object is not a directory, so we don't need to revalidate the attributes in that case. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index e7bc68fcbdf4..f0e39583af7e 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2500,6 +2500,8 @@ static int nfs_execute_ok(struct inode *inode, int mask)
struct nfs_server *server = NFS_SERVER(inode);
int ret = 0;
+ if (S_ISDIR(inode->i_mode))
+ return 0;
if (nfs_check_cache_invalid(inode, NFS_INO_INVALID_OTHER)) {
if (mask & MAY_NOT_BLOCK)
return -ECHILD;