aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-07-11 17:54:33 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-07-21 11:51:19 -0400
commiteda3e20847788c453aa7ab478aeaceb56ed29cb6 (patch)
tree5c3de3389a93be3284932a333853f3de129f84ec
parent15d4b73ac2232d6f2beb61d8b2400ea66e4da606 (diff)
NFSv3: Convert nfs3_proc_access() to use nfs_access_set_mask()
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r--fs/nfs/nfs3proc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index df4a7d3ab915..d1e87ec0df84 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -220,15 +220,8 @@ static int nfs3_proc_access(struct inode *inode, struct nfs_access_entry *entry)
220 220
221 status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0); 221 status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
222 nfs_refresh_inode(inode, res.fattr); 222 nfs_refresh_inode(inode, res.fattr);
223 if (status == 0) { 223 if (status == 0)
224 entry->mask = 0; 224 nfs_access_set_mask(entry, res.access);
225 if (res.access & NFS3_ACCESS_READ)
226 entry->mask |= MAY_READ;
227 if (res.access & (NFS3_ACCESS_MODIFY | NFS3_ACCESS_EXTEND | NFS3_ACCESS_DELETE))
228 entry->mask |= MAY_WRITE;
229 if (res.access & (NFS3_ACCESS_LOOKUP|NFS3_ACCESS_EXECUTE))
230 entry->mask |= MAY_EXEC;
231 }
232 nfs_free_fattr(res.fattr); 225 nfs_free_fattr(res.fattr);
233out: 226out:
234 dprintk("NFS reply access: %d\n", status); 227 dprintk("NFS reply access: %d\n", status);