diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-07 15:41:49 -0800 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-05-15 14:59:27 -0700 |
commit | 08cefc7ab839cf3ece44b8033968a4732eac06d8 (patch) | |
tree | 7264efb33cb3d1249f7be3a7ea6dd12d30c313c1 /fs/ext4/balloc.c | |
parent | 1523299d5817773e344d135d4b1c485f269400bc (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.c | 4 |
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, return 1; /* Hm, nope. Are (enough) root reserved clusters available? */ - if (sbi->s_resuid == current_fsuid() || - ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) || + if (uid_eq(sbi->s_resuid, current_fsuid()) || + (!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) || capable(CAP_SYS_RESOURCE) || (flags & EXT4_MB_USE_ROOT_BLOCKS)) { |