aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-10-20 15:33:37 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-11-13 17:08:21 -0500
commitbb08f76d8419a163b7a4212a0e4ea6bd25acacd1 (patch)
tree5b7ab38527a87c08289f5c8de0f10038172624f1
parent878d7439d0f45a95869e417576774673d1fa243f (diff)
rcu: Remove list_for_each_continue_rcu()
The list_for_each_continue_rcu() macro is no longer used, so this commit removes it. The list_for_each_entry_continue_rcu() macro should be used instead. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--Documentation/RCU/checklist.txt17
-rw-r--r--Documentation/RCU/whatisRCU.txt4
-rw-r--r--include/linux/rculist.h17
3 files changed, 9 insertions, 29 deletions
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index cdb20d41a44a..31ef8fe07f82 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -271,15 +271,14 @@ over a rather long period of time, but improvements are always welcome!
271 The same cautions apply to call_rcu_bh() and call_rcu_sched(). 271 The same cautions apply to call_rcu_bh() and call_rcu_sched().
272 272
2739. All RCU list-traversal primitives, which include 2739. All RCU list-traversal primitives, which include
274 rcu_dereference(), list_for_each_entry_rcu(), 274 rcu_dereference(), list_for_each_entry_rcu(), and
275 list_for_each_continue_rcu(), and list_for_each_safe_rcu(), 275 list_for_each_safe_rcu(), must be either within an RCU read-side
276 must be either within an RCU read-side critical section or 276 critical section or must be protected by appropriate update-side
277 must be protected by appropriate update-side locks. RCU 277 locks. RCU read-side critical sections are delimited by
278 read-side critical sections are delimited by rcu_read_lock() 278 rcu_read_lock() and rcu_read_unlock(), or by similar primitives
279 and rcu_read_unlock(), or by similar primitives such as 279 such as rcu_read_lock_bh() and rcu_read_unlock_bh(), in which
280 rcu_read_lock_bh() and rcu_read_unlock_bh(), in which case 280 case the matching rcu_dereference() primitive must be used in
281 the matching rcu_dereference() primitive must be used in order 281 order to keep lockdep happy, in this case, rcu_dereference_bh().
282 to keep lockdep happy, in this case, rcu_dereference_bh().
283 282
284 The reason that it is permissible to use RCU list-traversal 283 The reason that it is permissible to use RCU list-traversal
285 primitives when the update-side lock is held is that doing so 284 primitives when the update-side lock is held is that doing so
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index bf0f6de2aa00..9d30de00d730 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -789,9 +789,7 @@ RCU list traversal:
789 list_for_each_entry_rcu 789 list_for_each_entry_rcu
790 hlist_for_each_entry_rcu 790 hlist_for_each_entry_rcu
791 hlist_nulls_for_each_entry_rcu 791 hlist_nulls_for_each_entry_rcu
792 792 list_for_each_entry_continue_rcu
793 list_for_each_continue_rcu (to be deprecated in favor of new
794 list_for_each_entry_continue_rcu)
795 793
796RCU pointer/list update: 794RCU pointer/list update:
797 795
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index e0f0fab20415..c92dd28eaa6c 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -286,23 +286,6 @@ static inline void list_splice_init_rcu(struct list_head *list,
286 &pos->member != (head); \ 286 &pos->member != (head); \
287 pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) 287 pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
288 288
289
290/**
291 * list_for_each_continue_rcu
292 * @pos: the &struct list_head to use as a loop cursor.
293 * @head: the head for your list.
294 *
295 * Iterate over an rcu-protected list, continuing after current point.
296 *
297 * This list-traversal primitive may safely run concurrently with
298 * the _rcu list-mutation primitives such as list_add_rcu()
299 * as long as the traversal is guarded by rcu_read_lock().
300 */
301#define list_for_each_continue_rcu(pos, head) \
302 for ((pos) = rcu_dereference_raw(list_next_rcu(pos)); \
303 (pos) != (head); \
304 (pos) = rcu_dereference_raw(list_next_rcu(pos)))
305
306/** 289/**
307 * list_for_each_entry_continue_rcu - continue iteration over list of given type 290 * list_for_each_entry_continue_rcu - continue iteration over list of given type
308 * @pos: the type * to use as a loop cursor. 291 * @pos: the type * to use as a loop cursor.