Skip to content

Commit

Permalink
nfsd: fix comparison in fh_fsid_match()
Browse files Browse the repository at this point in the history
We're supposed to be testing that the fh_fsid's match but because the
parenthesis are in the wrong place, then we only check the first
byte.

Fixes: 9558f25 ('nfsd: add fh_fsid_match helper')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
Dan Carpenter authored and J. Bruce Fields committed Feb 12, 2015
1 parent c23ae60 commit 0ab39de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfsfh.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ static inline bool fh_fsid_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2)
{
if (fh1->fh_fsid_type != fh2->fh_fsid_type)
return false;
if (memcmp(fh1->fh_fsid, fh2->fh_fsid, key_len(fh1->fh_fsid_type) != 0))
if (memcmp(fh1->fh_fsid, fh2->fh_fsid, key_len(fh1->fh_fsid_type)) != 0)
return false;
return true;
}
Expand Down

0 comments on commit 0ab39de

Please sign in to comment.