Merge tag 'for-5.18/io_uring-2022-04-01' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / kernel / cgroup / cgroup.c
index 795c281..adb820e 100644 (file)
@@ -1302,7 +1302,7 @@ static struct css_set *find_css_set(struct css_set *old_cset,
 
 struct cgroup_root *cgroup_root_from_kf(struct kernfs_root *kf_root)
 {
-       struct cgroup *root_cgrp = kf_root->kn->priv;
+       struct cgroup *root_cgrp = kernfs_root_to_node(kf_root)->priv;
 
        return root_cgrp->root;
 }
@@ -2025,7 +2025,7 @@ int cgroup_setup_root(struct cgroup_root *root, u16 ss_mask)
                ret = PTR_ERR(root->kf_root);
                goto exit_root_id;
        }
-       root_cgrp->kn = root->kf_root->kn;
+       root_cgrp->kn = kernfs_root_to_node(root->kf_root);
        WARN_ON_ONCE(cgroup_ino(root_cgrp) != 1);
        root_cgrp->ancestor_ids[0] = cgroup_id(root_cgrp);