OSDN Git Service

fat: Fix corrupt inode flags when remove ATTR_SYS flag
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Tue, 31 May 2011 10:38:07 +0000 (19:38 +0900)
committerOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Tue, 31 May 2011 10:42:24 +0000 (19:42 +0900)
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>
fs/fat/file.c

index 7257752..7018e1d 100644 (file)
@@ -102,7 +102,7 @@ static int fat_ioctl_set_attributes(struct file *file, u32 __user *user_attr)
                if (attr & ATTR_SYS)
                        inode->i_flags |= S_IMMUTABLE;
                else
-                       inode->i_flags &= S_IMMUTABLE;
+                       inode->i_flags &= ~S_IMMUTABLE;
        }
 
        fat_save_attrs(inode, attr);