Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfd4c70a authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

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: default avatarSeth Forshee <seth.forshee@canonical.com>
Inspired-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent d49d3762
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;