NFS4: nfs4_opendata_access should return errno
authorWeston Andros Adamson <dros@netapp.com>
Fri, 2 Nov 2012 22:00:56 +0000 (18:00 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 2 Nov 2012 22:51:54 +0000 (18:51 -0400)
Return errno - not an NFS4ERR_. This worked because NFS4ERR_ACCESS == EACCES.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index 091baab3eccf602fa8984acab1d64dd29ee5b14c..5eec4429970c6e98af7a18732794c6fceaba4951 100644 (file)
@@ -1749,7 +1749,7 @@ static int nfs4_opendata_access(struct rpc_cred *cred,
 
        /* even though OPEN succeeded, access is denied. Close the file */
        nfs4_close_state(state, fmode);
-       return -NFS4ERR_ACCESS;
+       return -EACCES;
 }
 
 /*