From: Dan Carpenter Date: Wed, 11 Feb 2015 13:08:32 +0000 (+0300) Subject: nfsd: fix comparison in fh_fsid_match() X-Git-Tag: v4.14-rc1~5830^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ab39de6b341189589093777f241dd803b417fc0;p=platform%2Fkernel%2Flinux-rpi.git 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: 9558f2500a20 ('nfsd: add fh_fsid_match helper') Signed-off-by: Dan Carpenter Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfsfh.h b/fs/nfsd/nfsfh.h index 84cae20..f229204 100644 --- a/fs/nfsd/nfsfh.h +++ b/fs/nfsd/nfsfh.h @@ -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; }