Skip to content

Commit

Permalink
nfsd: clean up reset_union_bmap_deny
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Layton authored and J. Bruce Fields committed Jul 11, 2014
1 parent 6eb3a1d commit 3b84240
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3b84240

Please sign in to comment.