diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
commit | f1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch) | |
tree | c2c130a74be25b0b2dff992e1a195e2728bdaadd /fs/ext3/ialloc.c | |
parent | fd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff) | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'fs/ext3/ialloc.c')
-rw-r--r-- | fs/ext3/ialloc.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c index 0d0e97ed3ff6..498021eb88fb 100644 --- a/fs/ext3/ialloc.c +++ b/fs/ext3/ialloc.c | |||
@@ -538,16 +538,13 @@ got: | |||
538 | if (S_ISDIR(mode)) | 538 | if (S_ISDIR(mode)) |
539 | percpu_counter_inc(&sbi->s_dirs_counter); | 539 | percpu_counter_inc(&sbi->s_dirs_counter); |
540 | 540 | ||
541 | inode->i_uid = current_fsuid(); | 541 | |
542 | if (test_opt (sb, GRPID)) | 542 | if (test_opt(sb, GRPID)) { |
543 | inode->i_gid = dir->i_gid; | 543 | inode->i_mode = mode; |
544 | else if (dir->i_mode & S_ISGID) { | 544 | inode->i_uid = current_fsuid(); |
545 | inode->i_gid = dir->i_gid; | 545 | inode->i_gid = dir->i_gid; |
546 | if (S_ISDIR(mode)) | ||
547 | mode |= S_ISGID; | ||
548 | } else | 546 | } else |
549 | inode->i_gid = current_fsgid(); | 547 | inode_init_owner(inode, dir, mode); |
550 | inode->i_mode = mode; | ||
551 | 548 | ||
552 | inode->i_ino = ino; | 549 | inode->i_ino = ino; |
553 | /* This is the optimal IO size (for stat), not the fs block size */ | 550 | /* This is the optimal IO size (for stat), not the fs block size */ |