nfsd: fix comparison in fh_fsid_match()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 11 Feb 2015 13:08:32 +0000 (16:08 +0300)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 12 Feb 2015 16:26:19 +0000 (11:26 -0500)
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: 9558f2500a20 ('nfsd: add fh_fsid_match helper')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfsfh.h

index 84cae20..f229204 100644 (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;
 }