diff options
author | Michael Wang <wangyun@linux.vnet.ibm.com> | 2012-08-17 06:33:34 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-09-23 16:42:52 +0200 |
commit | 58fac09566bb48592a09ef0fe0c7dbefa0cd2109 (patch) | |
tree | 986cb396a8ee562281ef4e6bbe268eb0bcaf27e0 /mm | |
parent | time: RCU permitted to stop idle entry via softirq (diff) | |
download | linux-58fac09566bb48592a09ef0fe0c7dbefa0cd2109.tar.xz linux-58fac09566bb48592a09ef0fe0c7dbefa0cd2109.zip |
kmemleak: Replace list_for_each_continue_rcu with new interface
This patch replaces list_for_each_continue_rcu() with
list_for_each_entry_continue_rcu() to save a few lines
of code and allow removing list_for_each_continue_rcu().
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/kmemleak.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 45eb6217bf38..0de83b4541e9 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1483,13 +1483,11 @@ static void *kmemleak_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct kmemleak_object *prev_obj = v; struct kmemleak_object *next_obj = NULL; - struct list_head *n = &prev_obj->object_list; + struct kmemleak_object *obj = prev_obj; ++(*pos); - list_for_each_continue_rcu(n, &object_list) { - struct kmemleak_object *obj = - list_entry(n, struct kmemleak_object, object_list); + list_for_each_entry_continue_rcu(obj, &object_list, object_list) { if (get_object(obj)) { next_obj = obj; break; |