Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rcu: remove list_for_each_rcu()

All of the in-tree uses of list_for_each_rcu() have been converted to
list_for_each_entry_rcu(), so list_for_each_rcu() can now be removed.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Paul E. McKenney and committed by
Ingo Molnar
34d7c2b3 ff9cf2ce

+1 -17
+1 -1
Documentation/RCU/checklist.txt
··· 210 210 number of updates per grace period. 211 211 212 212 9. All RCU list-traversal primitives, which include 213 - rcu_dereference(), list_for_each_rcu(), list_for_each_entry_rcu(), 213 + rcu_dereference(), list_for_each_entry_rcu(), 214 214 list_for_each_continue_rcu(), and list_for_each_safe_rcu(), 215 215 must be either within an RCU read-side critical section or 216 216 must be protected by appropriate update-side locks. RCU
-2
Documentation/RCU/whatisRCU.txt
··· 786 786 list_for_each_entry_rcu 787 787 hlist_for_each_entry_rcu 788 788 789 - list_for_each_rcu (to be deprecated in favor of 790 - list_for_each_entry_rcu) 791 789 list_for_each_continue_rcu (to be deprecated in favor of new 792 790 list_for_each_entry_continue_rcu) 793 791
-14
include/linux/rculist.h
··· 198 198 at->prev = last; 199 199 } 200 200 201 - /** 202 - * list_for_each_rcu - iterate over an rcu-protected list 203 - * @pos: the &struct list_head to use as a loop cursor. 204 - * @head: the head for your list. 205 - * 206 - * This list-traversal primitive may safely run concurrently with 207 - * the _rcu list-mutation primitives such as list_add_rcu() 208 - * as long as the traversal is guarded by rcu_read_lock(). 209 - */ 210 - #define list_for_each_rcu(pos, head) \ 211 - for (pos = rcu_dereference((head)->next); \ 212 - prefetch(pos->next), pos != (head); \ 213 - pos = rcu_dereference(pos->next)) 214 - 215 201 #define __list_for_each_rcu(pos, head) \ 216 202 for (pos = rcu_dereference((head)->next); \ 217 203 pos != (head); \