diff mbox

NFS: Remove the NFSv4 "open optimisation" from nfs_permission

Message ID 1377018821-18925-1-git-send-email-Trond.Myklebust@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Trond Myklebust Aug. 20, 2013, 5:13 p.m. UTC
Ever since commit 6168f62cb (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 <Trond.Myklebust@netapp.com>
---
 fs/nfs/dir.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Adamson, Dros Aug. 20, 2013, 5:22 p.m. UTC | #1
Good catch!

-dros

On Aug 20, 2013, at 1:13 PM, Trond Myklebust <Trond.Myklebust@netapp.com> wrote:

> Ever since commit 6168f62cb (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 <Trond.Myklebust@netapp.com>
> ---
> fs/nfs/dir.c | 5 -----
> 1 file changed, 5 deletions(-)
> 
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index 39e69d4..5d737bd 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -2245,11 +2245,6 @@ int nfs_permission(struct inode *inode, int mask)
> 		case S_IFLNK:
> 			goto out;
> 		case S_IFREG:
> -			/* NFSv4 has atomic_open... */
> -			if (nfs_server_capable(inode, NFS_CAP_ATOMIC_OPEN)
> -					&& (mask & MAY_OPEN)
> -					&& !(mask & MAY_EXEC))
> -				goto out;
> 			break;
> 		case S_IFDIR:
> 			/*
> -- 
> 1.8.3.1
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 39e69d4..5d737bd 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2245,11 +2245,6 @@  int nfs_permission(struct inode *inode, int mask)
 		case S_IFLNK:
 			goto out;
 		case S_IFREG:
-			/* NFSv4 has atomic_open... */
-			if (nfs_server_capable(inode, NFS_CAP_ATOMIC_OPEN)
-					&& (mask & MAY_OPEN)
-					&& !(mask & MAY_EXEC))
-				goto out;
 			break;
 		case S_IFDIR:
 			/*