bitops: protect variables in set_mask_bits() macro
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 15 Oct 2018 13:43:06 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 08:45:05 +0000 (10:45 +0200)
commit442d7668a54d27b60033e5c4bc73303c21b0f52e
tree3d91bfc08f3ef0035a1f95334c2e9c74dc77265f
parentbf498d6b8d6017c7e1c7908190fa57508f823268
bitops: protect variables in set_mask_bits() macro

commit 18127429a854e7607b859484880b8e26cee9ddab upstream.

Unprotected naming of local variables within the set_mask_bits() can easily
lead to using the wrong scope.

Noticed this when "set_mask_bits(&foo->bar, 0, mask)" behaved as no-op.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 00a1a053ebe5 ("ext4: atomically set inode->i_flags in ext4_set_inode_flags()")
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/bitops.h