summaryrefslogtreecommitdiff
path: root/fs/quota
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2016-07-05 19:10:57 +0300
committerEric W. Biederman <ebiederm@xmission.com>2016-07-05 23:12:20 +0300
commitcfd4c70a18c4e806aaac2f483153dae01e0ace1c (patch)
treecb20e51efdcf598e85bc81194adf73dcf0b23f1c /fs/quota
parentd49d37624a1931c2f3b5d0cbe95bd5181cbdc279 (diff)
downloadlinux-cfd4c70a18c4e806aaac2f483153dae01e0ace1c.tar.xz
quota: Handle quota data stored in s_user_ns in quota_setxquota
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>
Diffstat (limited to 'fs/quota')
-rw-r--r--fs/quota/quota.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 73f6f4cf0a21..35df08ee9c97 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -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;