Skip to content

Commit eda3e20

Browse files
trondmypdamschuma-ntap
authored andcommitted
NFSv3: Convert nfs3_proc_access() to use nfs_access_set_mask()
Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 15d4b73 commit eda3e20

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

fs/nfs/nfs3proc.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,8 @@ static int nfs3_proc_access(struct inode *inode, struct nfs_access_entry *entry)
220220

221221
status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
222222
nfs_refresh_inode(inode, res.fattr);
223-
if (status == 0) {
224-
entry->mask = 0;
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-
}
223+
if (status == 0)
224+
nfs_access_set_mask(entry, res.access);
232225
nfs_free_fattr(res.fattr);
233226
out:
234227
dprintk("NFS reply access: %d\n", status);

0 commit comments

Comments
 (0)