Skip to content

Commit

Permalink
quota: Handle quota data stored in s_user_ns in quota_setxquota
Browse files Browse the repository at this point in the history
In Q_XSETQLIMIT use sb->s_user_ns to detect when we are dealing with
the filesystems notion of id 0.

Cc: Jan Kara <jack@suse.cz>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Inspired-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
  • Loading branch information
Eric W. Biederman committed Jul 5, 2016
1 parent d49d376 commit cfd4c70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/quota/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ static int quota_setxquota(struct super_block *sb, int type, qid_t id,
if (!qid_has_mapping(sb->s_user_ns, qid))
return -EINVAL;
/* Are we actually setting timer / warning limits for all users? */
if (from_kqid(&init_user_ns, qid) == 0 &&
if (from_kqid(sb->s_user_ns, qid) == 0 &&
fdq.d_fieldmask & (FS_DQ_WARNS_MASK | FS_DQ_TIMER_MASK)) {
struct qc_info qinfo;
int ret;
Expand Down

0 comments on commit cfd4c70

Please sign in to comment.