diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 492215d67fa5c3f153f6b1de42416ec4a1653298..5a54ff42874ee916997139c859b8cfda725b9a33 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1115,8 +1115,10 @@ static void cgroup_kill_sb(struct super_block *sb) { } write_unlock(&css_set_lock); - list_del(&root->root_list); - root_count--; + if (!list_empty(&root->root_list)) { + list_del(&root->root_list); + root_count--; + } mutex_unlock(&cgroup_mutex);