Commit c25ff4b9 authored by Kamalesh Babulal's avatar Kamalesh Babulal Committed by Tejun Heo
Browse files

cgroup: remove cgrp->kn check in css_populate_dir()



cgroup_create() creates cgrp and assigns the kernfs_node to cgrp->kn,
then cgroup_mkdir() populates base and csses cft file by calling
css_populate_dir() and cgroup_apply_control_enable() with a valid
cgrp->kn. Check for NULL cgrp->kn, will always be false, remove it.

Signed-off-by: default avatarKamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 6f71780e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1714,7 +1714,7 @@ static int css_populate_dir(struct cgroup_subsys_state *css)
	struct cftype *cfts, *failed_cfts;
	int ret;

	if ((css->flags & CSS_VISIBLE) || !cgrp->kn)
	if (css->flags & CSS_VISIBLE)
		return 0;

	if (!css->ss) {