diff options
Diffstat (limited to 'fs/ext4')
| -rw-r--r-- | fs/ext4/balloc.c | 2 | ||||
| -rw-r--r-- | fs/ext4/ialloc.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index db35cfdb3c8b..38b3acf5683b 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
| @@ -624,7 +624,7 @@ int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks) | |||
| 624 | return 1; | 624 | return 1; |
| 625 | 625 | ||
| 626 | /* Hm, nope. Are (enough) root reserved blocks available? */ | 626 | /* Hm, nope. Are (enough) root reserved blocks available? */ |
| 627 | if (sbi->s_resuid == current->fsuid || | 627 | if (sbi->s_resuid == current_fsuid() || |
| 628 | ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) || | 628 | ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) || |
| 629 | capable(CAP_SYS_RESOURCE)) { | 629 | capable(CAP_SYS_RESOURCE)) { |
| 630 | if (free_blocks >= (nblocks + dirty_blocks)) | 630 | if (free_blocks >= (nblocks + dirty_blocks)) |
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 2a117e286e54..08cac9fcace2 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
| @@ -787,7 +787,7 @@ got: | |||
| 787 | spin_unlock(sb_bgl_lock(sbi, flex_group)); | 787 | spin_unlock(sb_bgl_lock(sbi, flex_group)); |
| 788 | } | 788 | } |
| 789 | 789 | ||
| 790 | inode->i_uid = current->fsuid; | 790 | inode->i_uid = current_fsuid(); |
| 791 | if (test_opt(sb, GRPID)) | 791 | if (test_opt(sb, GRPID)) |
| 792 | inode->i_gid = dir->i_gid; | 792 | inode->i_gid = dir->i_gid; |
| 793 | else if (dir->i_mode & S_ISGID) { | 793 | else if (dir->i_mode & S_ISGID) { |
| @@ -795,7 +795,7 @@ got: | |||
| 795 | if (S_ISDIR(mode)) | 795 | if (S_ISDIR(mode)) |
| 796 | mode |= S_ISGID; | 796 | mode |= S_ISGID; |
| 797 | } else | 797 | } else |
| 798 | inode->i_gid = current->fsgid; | 798 | inode->i_gid = current_fsgid(); |
| 799 | inode->i_mode = mode; | 799 | inode->i_mode = mode; |
| 800 | 800 | ||
| 801 | inode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb); | 801 | inode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb); |
