Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by

Dan Carpenter and committed by
J. Bruce Fields
0ab39de6 c23ae601

+1 -1
+1 -1
fs/nfsd/nfsfh.h
··· 200 200 { 201 201 if (fh1->fh_fsid_type != fh2->fh_fsid_type) 202 202 return false; 203 - if (memcmp(fh1->fh_fsid, fh2->fh_fsid, key_len(fh1->fh_fsid_type) != 0)) 203 + if (memcmp(fh1->fh_fsid, fh2->fh_fsid, key_len(fh1->fh_fsid_type)) != 0) 204 204 return false; 205 205 return true; 206 206 }