Skip to content

Commit

Permalink
cgroup: don't use idr_remove_all()
Browse files Browse the repository at this point in the history
idr_destroy() can destroy idr by itself and idr_remove_all() is being
deprecated.  Drop its usage.

Signed-off-by: Tejun Heo <[email protected]>
Acked-by: Li Zefan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
htejun authored and torvalds committed Feb 28, 2013
1 parent 644e1b9 commit c897ff6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -4618,10 +4618,8 @@ void cgroup_unload_subsys(struct cgroup_subsys *ss)
offline_css(ss, dummytop);
ss->active = 0;

if (ss->use_id) {
idr_remove_all(&ss->idr);
if (ss->use_id)
idr_destroy(&ss->idr);
}

/* deassign the subsys_id */
subsys[ss->subsys_id] = NULL;
Expand Down

0 comments on commit c897ff6

Please sign in to comment.