From: OGAWA Hirofumi Date: Tue, 31 May 2011 10:38:07 +0000 (+0900) Subject: fat: Fix corrupt inode flags when remove ATTR_SYS flag X-Git-Tag: v2.6.39.2~51 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=36980edb6cde842b885c118f59a8e3c9d51d7869;p=karo-tx-linux.git fat: Fix corrupt inode flags when remove ATTR_SYS flag commit 1adffbae22332bb558c2a29de19d9aca391869f6 upstream. We are clearly missing '~' in fat_ioctl_set_attributes(). Reported-by: Dmitry Dmitriev Signed-off-by: OGAWA Hirofumi Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/fat/file.c b/fs/fat/file.c index 7257752b6d5d..7018e1d8902d 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -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);