From: Dan Carpenter <dan.carpenter@oracle.com> To: "J. Bruce Fields" <bfields@fieldses.org>, Christoph Hellwig <hch@lst.de> Cc: linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] nfsd: fix comparison in fh_fsid_match() Date: Wed, 11 Feb 2015 13:08:32 +0000 [thread overview] Message-ID: <20150211130832.GA25573@mwanda> (raw) 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> 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; }
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: "J. Bruce Fields" <bfields@fieldses.org>, Christoph Hellwig <hch@lst.de> Cc: linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] nfsd: fix comparison in fh_fsid_match() Date: Wed, 11 Feb 2015 16:08:32 +0300 [thread overview] Message-ID: <20150211130832.GA25573@mwanda> (raw) 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> 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; }
next reply other threads:[~2015-02-11 13:08 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-11 13:08 Dan Carpenter [this message] 2015-02-11 13:08 ` [patch] nfsd: fix comparison in fh_fsid_match() Dan Carpenter 2015-02-11 13:21 ` Christoph Hellwig 2015-02-11 13:21 ` Christoph Hellwig 2015-02-11 14:03 ` Dan Carpenter 2015-02-11 14:03 ` Dan Carpenter 2015-02-12 20:29 ` J. Bruce Fields 2015-02-12 20:29 ` J. Bruce Fields
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20150211130832.GA25573@mwanda \ --to=dan.carpenter@oracle.com \ --cc=bfields@fieldses.org \ --cc=hch@lst.de \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-nfs@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.