aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/balloc.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-07 18:41:49 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-05-15 17:59:27 -0400
commit08cefc7ab839cf3ece44b8033968a4732eac06d8 (patch)
tree7264efb33cb3d1249f7be3a7ea6dd12d30c313c1 /fs/ext4/balloc.c
parent1523299d5817773e344d135d4b1c485f269400bc (diff)
userns: Convert ext4 to user kuid/kgid where appropriate
Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r--fs/ext4/balloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 4bbd07a6fa18..c45c41129a35 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -461,8 +461,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi,
461 return 1; 461 return 1;
462 462
463 /* Hm, nope. Are (enough) root reserved clusters available? */ 463 /* Hm, nope. Are (enough) root reserved clusters available? */
464 if (sbi->s_resuid == current_fsuid() || 464 if (uid_eq(sbi->s_resuid, current_fsuid()) ||
465 ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) || 465 (!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) ||
466 capable(CAP_SYS_RESOURCE) || 466 capable(CAP_SYS_RESOURCE) ||
467 (flags & EXT4_MB_USE_ROOT_BLOCKS)) { 467 (flags & EXT4_MB_USE_ROOT_BLOCKS)) {
468 468