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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:24:06 +0000 (15:24 -0700)
commit 1adffbae22332bb558c2a29de19d9aca391869f6 upstream.

We are clearly missing '~' in fat_ioctl_set_attributes().

Reported-by: Dmitry Dmitriev <dimondmm@yandex.ru>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/fat/file.c

index e8c159de236b4cefbdd737ac4ccb04afbc4fae9d..279937bf6e14b7e7dbcceecf2952f7aea50817c5 100644 (file)
@@ -101,7 +101,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);