]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Revert "(namespace) quota: Handle quota data stored in s_user_ns in quota_setxquota"
authorLuis Henriques <luis.henriques@canonical.com>
Wed, 23 Nov 2016 10:00:31 +0000 (10:00 +0000)
committerLuis Henriques <luis.henriques@canonical.com>
Wed, 23 Nov 2016 10:14:12 +0000 (10:14 +0000)
BugLink: https://bugs.launchpad.net/bugs/1644165
This reverts commit 0beac1b4cc436ff1fa18b0f6636ee4e051239335.

The kernel fix for bug #1634964 breaks LXD userspace, in particular the
following commits:

ac7f3f73cb39 (namespace) vfs: Don't modify inodes with a uid or gid unknown to the vfs
ca52383ad6a6 (namespace) vfs: Don't create inodes with a uid or gid unknown to the vfs

LXD 2.0.6 will include changes to support these kernel changes, but it isn't
available yet on xenial, so for now we just revert these commits.

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
fs/quota/quota.c

index 9b34845126b70652f1e893960eeb4eddeee78a17..7fc43921e6d197a902d26070c7d1ae9b9b8e6f76 100644 (file)
@@ -556,7 +556,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(sb->s_user_ns, qid) == 0 &&
+       if (from_kqid(&init_user_ns, qid) == 0 &&
            fdq.d_fieldmask & (FS_DQ_WARNS_MASK | FS_DQ_TIMER_MASK)) {
                struct qc_info qinfo;
                int ret;