Skip to content

Commit

Permalink
nfsd: simplify test_bit return in NFSD_FILE_KEY_FULL comparator
Browse files Browse the repository at this point in the history
test_bit returns bool, so we can just compare the result of that to the
key->gc value without the "!!".

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
Jeff Layton authored and Chuck Lever committed Apr 26, 2023
1 parent 6c31e4c commit d69b8db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/filecache.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static int nfsd_file_obj_cmpfn(struct rhashtable_compare_arg *arg,
return 1;
if (!nfsd_match_cred(nf->nf_cred, key->cred))
return 1;
if (!!test_bit(NFSD_FILE_GC, &nf->nf_flags) != key->gc)
if (test_bit(NFSD_FILE_GC, &nf->nf_flags) != key->gc)
return 1;
if (test_bit(NFSD_FILE_HASHED, &nf->nf_flags) == 0)
return 1;
Expand Down

0 comments on commit d69b8db

Please sign in to comment.