diff options
author | Jan Kara <jack@suse.cz> | 2007-05-08 03:31:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:13 -0400 |
commit | 4f99ed67cc1cf5302ea18aa042d75641b61a0a1b (patch) | |
tree | abf64c561c22b1aa1ba03f2dfb0bdef4d156ca8a /fs/ext2/ioctl.c | |
parent | 28ec039c21839914389975b896160a815ffd8b83 (diff) |
ext3: copy i_flags to inode flags on write
Propagate flags such as S_APPEND, S_IMMUTABLE, etc. from i_flags into
ext2-specific i_flags. Hence, when someone sets these flags via a different
interface than ioctl, they are stored correctly.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext2/ioctl.c')
-rw-r--r-- | fs/ext2/ioctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c index 4b099d310712..e85c48218239 100644 --- a/fs/ext2/ioctl.c +++ b/fs/ext2/ioctl.c | |||
@@ -27,6 +27,7 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, | |||
27 | 27 | ||
28 | switch (cmd) { | 28 | switch (cmd) { |
29 | case EXT2_IOC_GETFLAGS: | 29 | case EXT2_IOC_GETFLAGS: |
30 | ext2_get_inode_flags(ei); | ||
30 | flags = ei->i_flags & EXT2_FL_USER_VISIBLE; | 31 | flags = ei->i_flags & EXT2_FL_USER_VISIBLE; |
31 | return put_user(flags, (int __user *) arg); | 32 | return put_user(flags, (int __user *) arg); |
32 | case EXT2_IOC_SETFLAGS: { | 33 | case EXT2_IOC_SETFLAGS: { |