Skip to content

Commit 1adffba

Browse files
committed
fat: Fix corrupt inode flags when remove ATTR_SYS flag
We are clearly missing '~' in fat_ioctl_set_attributes(). Cc: <stable@kernel.org> Reported-by: Dmitry Dmitriev <dimondmm@yandex.ru> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
1 parent 55922c9 commit 1adffba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/fat/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static int fat_ioctl_set_attributes(struct file *file, u32 __user *user_attr)
102102
if (attr & ATTR_SYS)
103103
inode->i_flags |= S_IMMUTABLE;
104104
else
105-
inode->i_flags &= S_IMMUTABLE;
105+
inode->i_flags &= ~S_IMMUTABLE;
106106
}
107107

108108
fat_save_attrs(inode, attr);

0 commit comments

Comments
 (0)