Commit 0ab39de6 authored by Dan Carpenter's avatar Dan Carpenter Committed by J. Bruce Fields

nfsd: fix comparison in fh_fsid_match()

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: 9558f250 ('nfsd: add fh_fsid_match helper')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent c23ae601
...@@ -200,7 +200,7 @@ static inline bool fh_fsid_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2) ...@@ -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) if (fh1->fh_fsid_type != fh2->fh_fsid_type)
return false; 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 false;
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment