nfsd: clean up reset_union_bmap_deny
authorJeff Layton <jlayton@primarydata.com>
Thu, 10 Jul 2014 18:07:32 +0000 (14:07 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 11 Jul 2014 15:06:11 +0000 (11:06 -0400)
Fix the "deny" argument type, and start the loop at 1. The 0 iteration
is always a noop.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 0a54fc9..5f72947 100644 (file)
@@ -4266,10 +4266,11 @@ static inline void nfs4_stateid_downgrade(struct nfs4_ol_stateid *stp, u32 to_ac
 }
 
 static void
-reset_union_bmap_deny(unsigned long deny, struct nfs4_ol_stateid *stp)
+reset_union_bmap_deny(u32 deny, struct nfs4_ol_stateid *stp)
 {
        int i;
-       for (i = 0; i < 4; i++) {
+
+       for (i = 1; i < 4; i++) {
                if ((i & deny) != i)
                        clear_deny(i, stp);
        }