cgroup: remove rcu_read_lock() from css_get_next()
PATCH 1/1 cgroup: remove rcu_read_lock() from css_get_next()
cgroup: remove rcu_read_lock() from css_get_next()
Callers of css_get_next() are already calling css_get_next() under rcu_read_lock() and hence there there is no need for css_get_next() to re-acquire rcu_read_lock(). As per the comments in css_get_next(), let the callers accquire the rcu_read_lock().
--- kernel/cgroup.c | 3 --- 1 file changed, 3 deletions(-)
kernel/cgroup.c +0 -3
@@ -3553,7 +3553,6 @@ css_get_next(struct cgroup_subsys *ss, ireturn NULL ;BUG_ON (!ss->use_id); -rcu_read_lock ();/* fill start point for scan */ tmpid = id;while (1 ) {
@@ -3577,8 +3576,6 @@ css_get_next(struct cgroup_subsys *ss, i/* continue to scan from next id */ tmpid = tmpid +1 ; } - -rcu_read_unlock ();return ret; }
Regards,
Bharata.
Quoted 9 lines · On Wed, 4 Mar 2009 09:59:20 +0530 Bharata B Rao <[email protected]>…
cgroup: remove
rcu_read_lock()fromcss_get_next()Callers of
css_get_next()are already callingcss_get_next()underrcu_read_lock()and hence there there is no need forcss_get_next()to re-acquirercu_read_lock(). As per the comments incss_get_next(), let the callers accquire thercu_read_lock().Signed-off-by Bharata B Rao <[email protected]>
Yes, thank you for pointing out. This should be done by caller.
Quoted 26 lines
--- kernel/cgroup.c | 3 --- 1 file changed, 3 deletions(-)kernel/cgroup.c +0
-3@@ -3553,7 +3553,6 @@ css_get_next(struct cgroup_subsys *ss, ireturn NULL ;BUG_ON (!ss->use_id); -rcu_read_lock ();/* fill start point for scan */ tmpid = id;while (1 ) {@@ -3577,8 +3576,6 @@ css_get_next(struct cgroup_subsys *ss, i/* continue to scan from next id */ tmpid = tmpid +1 ; } - -rcu_read_unlock ();return ret; }Regards,
Bharata.