[PATCH] knfsd: nfsd4: remove superfluous grace period checks
[deliverable/linux.git] / fs / nfsd / nfs4acl.c
index 63818a51c05c16a75c1e960b49d2d6ea1ca2918d..edb107e61b91d8583f18e1bc26fe8c63e066196a 100644 (file)
@@ -710,9 +710,9 @@ calculate_posix_ace_count(struct nfs4_acl *n4acl)
                /* Also, the remaining entries are for named users and
                 * groups, and come in threes (mask, allow, deny): */
                if (n4acl->naces < 7)
-                       return -1;
+                       return -EINVAL;
                if ((n4acl->naces - 7) % 3)
-                       return -1;
+                       return -EINVAL;
                return 4 + (n4acl->naces - 7)/3;
        }
 }
@@ -866,7 +866,7 @@ nfs4_acl_add_ace(struct nfs4_acl *acl, u32 type, u32 flag, u32 access_mask,
        struct nfs4_ace *ace;
 
        if ((ace = kmalloc(sizeof(*ace), GFP_KERNEL)) == NULL)
-               return -1;
+               return -ENOMEM;
 
        ace->type = type;
        ace->flag = flag;
This page took 0.027741 seconds and 5 git commands to generate.