Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309969
b: refs/heads/master
c: 7990696
h: refs/heads/master
i:
  309967: f12b29a
v: v3
  • Loading branch information
Theodore Ts'o committed Jun 1, 2012
1 parent 7b98b6c commit 1d409b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9660755100ae7677d65772a28e16d475a2ee9eab
refs/heads/master: 79906964a187c405db72a3abc60eb9b50d804fbc
12 changes: 9 additions & 3 deletions trunk/fs/ext4/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
handle_t *handle = NULL;
int err, migrate = 0;
struct ext4_iloc iloc;
unsigned int oldflags;
unsigned int oldflags, mask, i;
unsigned int jflag;

if (!inode_owner_or_capable(inode))
Expand Down Expand Up @@ -115,8 +115,14 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (err)
goto flags_err;

flags = flags & EXT4_FL_USER_MODIFIABLE;
flags |= oldflags & ~EXT4_FL_USER_MODIFIABLE;
for (i = 0, mask = 1; i < 32; i++, mask <<= 1) {
if (!(mask & EXT4_FL_USER_MODIFIABLE))
continue;
if (mask & flags)
ext4_set_inode_flag(inode, i);
else
ext4_clear_inode_flag(inode, i);
}
ei->i_flags = flags;

ext4_set_inode_flags(inode);
Expand Down

0 comments on commit 1d409b9

Please sign in to comment.