]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
quota: Handle quota data stored in s_user_ns in quota_setxquota
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 5 Jul 2016 16:10:57 +0000 (11:10 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 5 Jul 2016 20:12:20 +0000 (15:12 -0500)
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>
fs/quota/quota.c

index 73f6f4cf0a210791570ee3e370a17c3665c98a93..35df08ee9c97da4f489748b674b778bd61f074df 100644 (file)
@@ -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;