Browse Source

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>
Trond Myklebust 7 years ago
parent
commit
3825827ebf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      fs/nfs/dir.c

+ 2 - 0
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);
 	struct nfs_server *server = NFS_SERVER(inode);
 	int ret = 0;
 	int ret = 0;
 
 
+	if (S_ISDIR(inode->i_mode))
+		return 0;
 	if (nfs_check_cache_invalid(inode, NFS_INO_INVALID_OTHER)) {
 	if (nfs_check_cache_invalid(inode, NFS_INO_INVALID_OTHER)) {
 		if (mask & MAY_NOT_BLOCK)
 		if (mask & MAY_NOT_BLOCK)
 			return -ECHILD;
 			return -ECHILD;