]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/nfs/nfs3proc.c
Merge tag 'char-misc-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
[karo-tx-linux.git] / fs / nfs / nfs3proc.c
index 0c07b567118dcd8a99d924a738c0fe7a0149bf43..d1e87ec0df8482d272b2a2c481b0eb3d76401ebd 100644 (file)
@@ -220,15 +220,8 @@ static int nfs3_proc_access(struct inode *inode, struct nfs_access_entry *entry)
 
        status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
        nfs_refresh_inode(inode, res.fattr);
-       if (status == 0) {
-               entry->mask = 0;
-               if (res.access & NFS3_ACCESS_READ)
-                       entry->mask |= MAY_READ;
-               if (res.access & (NFS3_ACCESS_MODIFY | NFS3_ACCESS_EXTEND | NFS3_ACCESS_DELETE))
-                       entry->mask |= MAY_WRITE;
-               if (res.access & (NFS3_ACCESS_LOOKUP|NFS3_ACCESS_EXECUTE))
-                       entry->mask |= MAY_EXEC;
-       }
+       if (status == 0)
+               nfs_access_set_mask(entry, res.access);
        nfs_free_fattr(res.fattr);
 out:
        dprintk("NFS reply access: %d\n", status);
@@ -621,7 +614,7 @@ out:
  */
 static int
 nfs3_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
-                 u64 cookie, struct page **pages, unsigned int count, int plus)
+                 u64 cookie, struct page **pages, unsigned int count, bool plus)
 {
        struct inode            *dir = d_inode(dentry);
        __be32                  *verf = NFS_I(dir)->cookieverf;