diff options
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index a220fdb66568..59aa339a245c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -5451,7 +5451,7 @@ struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry, | |||
5451 | struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss) | 5451 | struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss) |
5452 | { | 5452 | { |
5453 | WARN_ON_ONCE(!rcu_read_lock_held()); | 5453 | WARN_ON_ONCE(!rcu_read_lock_held()); |
5454 | return idr_find(&ss->css_idr, id); | 5454 | return id > 0 ? idr_find(&ss->css_idr, id) : NULL; |
5455 | } | 5455 | } |
5456 | 5456 | ||
5457 | #ifdef CONFIG_CGROUP_DEBUG | 5457 | #ifdef CONFIG_CGROUP_DEBUG |