1
0
Fork 0

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: 9558f2500a ('nfsd: add fh_fsid_match helper')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
hifive-unleashed-5.1
Dan Carpenter 2015-02-11 16:08:32 +03:00 committed by J. Bruce Fields
parent c23ae60178
commit 0ab39de6b3
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}