Skip to content

Commit 5948a40

Browse files
Trond MyklebustTrond Myklebust
authored andcommitted
NFS: Remove the NFSv4 "open optimisation" from nfs_permission
Ever since commit 6168f62 (Add ACCESS operation to OPEN compound) the NFSv4 atomic open has primed the access cache, and so nfs_permission will no longer do an RPC call on the wire. Signed-off-by: Trond Myklebust <[email protected]>
1 parent 9743120 commit 5948a40

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

fs/nfs/dir.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,11 +2245,6 @@ int nfs_permission(struct inode *inode, int mask)
22452245
case S_IFLNK:
22462246
goto out;
22472247
case S_IFREG:
2248-
/* NFSv4 has atomic_open... */
2249-
if (nfs_server_capable(inode, NFS_CAP_ATOMIC_OPEN)
2250-
&& (mask & MAY_OPEN)
2251-
&& !(mask & MAY_EXEC))
2252-
goto out;
22532248
break;
22542249
case S_IFDIR:
22552250
/*

0 commit comments

Comments
 (0)