diff options
Diffstat (limited to 'fs/ext3/balloc.c')
-rw-r--r-- | fs/ext3/balloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index baac1b129fb..25cd6089211 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c | |||
@@ -1439,8 +1439,9 @@ static int ext3_has_free_blocks(struct ext3_sb_info *sbi, int use_reservation) | |||
1439 | free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter); | 1439 | free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter); |
1440 | root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count); | 1440 | root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count); |
1441 | if (free_blocks < root_blocks + 1 && !capable(CAP_SYS_RESOURCE) && | 1441 | if (free_blocks < root_blocks + 1 && !capable(CAP_SYS_RESOURCE) && |
1442 | !use_reservation && sbi->s_resuid != current_fsuid() && | 1442 | !use_reservation && !uid_eq(sbi->s_resuid, current_fsuid()) && |
1443 | (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) { | 1443 | (gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) || |
1444 | !in_group_p (sbi->s_resgid))) { | ||
1444 | return 0; | 1445 | return 0; |
1445 | } | 1446 | } |
1446 | return 1; | 1447 | return 1; |