commit: 1adffbae22332bb558c2a29de19d9aca391869f6
From: OGAWA Hirofumi <[email protected]>
Date: Tue, 31 May 2011 19:38:07 +0900
Subject: [PATCH] fat: Fix corrupt inode flags when remove ATTR_SYS flag

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

Cc: <[email protected]>
Reported-by: Dmitry Dmitriev <[email protected]>
Signed-off-by: OGAWA Hirofumi <[email protected]>
---
 fs/fat/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/fat/file.c b/fs/fat/file.c
index 7257752..7018e1d 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);

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to