linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] nfsd4: typo logical vs bitwise negate
@ 2011-10-17  7:41 Dan Carpenter
  2011-10-17 12:35 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-10-17  7:41 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Neil Brown, linux-nfs, kernel-janitors

This should be a bitwise negate here.  It silences a Sparse warning:
fs/nfsd/nfs4xdr.c:693:16: warning: dubious: x & !y

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 2cab33c..645a0a9 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -690,7 +690,7 @@ static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x)
 	READ_BUF(4);
 	READ32(*x);
 	/* Note: unlinke access bits, deny bits may be zero. */
-	if (*x & !NFS4_SHARE_DENY_BOTH)
+	if (*x & ~NFS4_SHARE_DENY_BOTH)
 		return nfserr_bad_xdr;
 	return nfs_ok;
 xdr_error:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-17 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17  7:41 [patch] nfsd4: typo logical vs bitwise negate Dan Carpenter
2011-10-17 12:35 ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).