[PATCH 2/5] fs: Fix WARN_ON in inode_set_mask()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



WARN_ON in inode_set_mask() warns if we don't clear all bits we are
setting instead of reverse - warning when caller requests setting and
clearing of the same bit.

Signed-off-by: Jan Kara <jack@xxxxxxx>
---
 fs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/inode.c b/fs/inode.c
index fcc0886c5824..3490389dc813 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1923,7 +1923,7 @@ void inode_set_flags(struct inode *inode, unsigned int flags,
 {
 	unsigned int old_flags, new_flags;
 
-	WARN_ON_ONCE(flags & ~mask);
+	WARN_ON_ONCE(flags & mask);
 	do {
 		old_flags = ACCESS_ONCE(inode->i_flags);
 		new_flags = (old_flags & ~mask) | flags;
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux