kmemleak: replace list_for_each_continue_rcu with new interface
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/3 kmemleak: replace list_for_each_continue_rcu with new interface
From: Michael Wang <[email protected]>
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().
--- mm/kmemleak.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
mm/kmemleak.c +2 -4
@@ -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 ;
Signature · 8 lines
1.7.4.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Michael Wang
From: Michael Wang <[email protected]>
This patch replaces
list_for_each_continue_rcu()withlist_for_each_entry_continue_rcu()to save a few lines of code and allow removinglist_for_each_continue_rcu().Signed-off-by Michael Wang <[email protected]>
Quoted 28 lines
--- mm/kmemleak.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)mm/kmemleak.c +2
-4@@ -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 ;Signature · 1 line
1.7.4.1
Quoted 5 lines · Michael Wang
From: Michael Wang <[email protected]>
This patch replaces
list_for_each_continue_rcu()withlist_for_each_entry_continue_rcu()to save a few lines of code and allow removinglist_for_each_continue_rcu().
Hi, Catalin
Could I get some comments on this patch?
Regards,
Michael Wang
Quoted 27 lines
Signed-off-by Michael Wang <[email protected]>--- mm/kmemleak.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)mm/kmemleak.c +2
-4@@ -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 ;
Quoted 8 lines · Michael Wang
Quoted 5 lines · Michael Wang
From: Michael Wang <[email protected]>
This patch replaces
list_for_each_continue_rcu()withlist_for_each_entry_continue_rcu()to save a few lines of code and allow removinglist_for_each_continue_rcu().Could I get some comments on this patch?
Sorry, busy with other things and forgot about this.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Paul E. McKenney
AppliedQuoted 8 lines · Catalin Marinas
Quoted 7 lines · Michael Wang
Quoted 5 lines · Michael Wang
From: Michael Wang <[email protected]>
This patch replaces
list_for_each_continue_rcu()withlist_for_each_entry_continue_rcu()to save a few lines of code and allow removinglist_for_each_continue_rcu().
Quoted 5 lines
Quoted 1 line
Could I get some comments on this patch?
Sorry, busy with other things and forgot about this.
Acked-by Catalin Marinas <[email protected]>
Queued, thank you both!
Thanx, Paul