Commit 58fac09566bb48592a09ef0fe0c7dbefa0cd2109

Authored by Michael Wang
Committed by Paul E. McKenney
1 parent 803b0ebae9

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>

Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff

... ... @@ -1483,13 +1483,11 @@
1483 1483 {
1484 1484 struct kmemleak_object *prev_obj = v;
1485 1485 struct kmemleak_object *next_obj = NULL;
1486   - struct list_head *n = &prev_obj->object_list;
  1486 + struct kmemleak_object *obj = prev_obj;
1487 1487  
1488 1488 ++(*pos);
1489 1489  
1490   - list_for_each_continue_rcu(n, &object_list) {
1491   - struct kmemleak_object *obj =
1492   - list_entry(n, struct kmemleak_object, object_list);
  1490 + list_for_each_entry_continue_rcu(obj, &object_list, object_list) {
1493 1491 if (get_object(obj)) {
1494 1492 next_obj = obj;
1495 1493 break;