From: Rusty Russell <rusty@rustcorp.com.au>
To: Paul McKenney <Paul.McKenney@us.ibm.com>,
Dipankar Sarma <dipankar@in.ibm.com>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Remove nonsensical list function list_for_each_safe_rcu
Date: Tue, 18 Jan 2005 17:26:05 +1100 [thread overview]
Message-ID: <1106029565.30801.45.camel@localhost.localdomain> (raw)
Name: Remove nonsensical list function
Status: Trivial
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
The correct use of list_for_each_safe_rcu is a coding puzzle which
minor minds such mine are not capable of solving. Please remove this
obstacle on my path to enlightenment.
Index: linux-2.6.11-rc1-bk5-Misc/Documentation/RCU/checklist.txt
===================================================================
--- linux-2.6.11-rc1-bk5-Misc.orig/Documentation/RCU/checklist.txt 2005-01-18 17:20:56.484344256 +1100
+++ linux-2.6.11-rc1-bk5-Misc/Documentation/RCU/checklist.txt 2005-01-18 17:21:12.846856776 +1100
@@ -132,11 +132,11 @@
9. All RCU list-traversal primitives, which include
list_for_each_rcu(), list_for_each_entry_rcu(),
- list_for_each_continue_rcu(), and list_for_each_safe_rcu(),
- must be within an RCU read-side critical section. RCU
- read-side critical sections are delimited by rcu_read_lock()
- and rcu_read_unlock(), or by similar primitives such as
- rcu_read_lock_bh() and rcu_read_unlock_bh().
+ and list_for_each_continue_rcu(), must be within an RCU
+ read-side critical section. RCU read-side critical sections
+ are delimited by rcu_read_lock() and rcu_read_unlock(), or by
+ similar primitives such as rcu_read_lock_bh()
+ and rcu_read_unlock_bh().
Use of the _rcu() list-traversal primitives outside of an
RCU read-side critical section causes no harm other than
Index: linux-2.6.11-rc1-bk5-Misc/include/linux/list.h
===================================================================
--- linux-2.6.11-rc1-bk5-Misc.orig/include/linux/list.h 2005-01-18 17:18:39.394185128 +1100
+++ linux-2.6.11-rc1-bk5-Misc/include/linux/list.h 2005-01-18 17:19:47.098892448 +1100
@@ -436,21 +436,6 @@
pos = rcu_dereference(pos->next))
/**
- * list_for_each_safe_rcu - iterate over an rcu-protected list safe
- * against removal of list entry
- * @pos: the &struct list_head to use as a loop counter.
- * @n: another &struct list_head to use as temporary storage
- * @head: the head for your list.
- *
- * This list-traversal primitive may safely run concurrently with
- * the _rcu list-mutation primitives such as list_add_rcu()
- * as long as the traversal is guarded by rcu_read_lock().
- */
-#define list_for_each_safe_rcu(pos, n, head) \
- for (pos = (head)->next, n = pos->next; pos != (head); \
- pos = rcu_dereference(n), n = pos->next)
-
-/**
* list_for_each_entry_rcu - iterate over rcu list of given type
* @pos: the type * to use as a loop counter.
* @head: the head for your list.
--
A bad analogy is like a leaky screwdriver -- Richard Braakman
reply other threads:[~2005-01-18 6:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1106029565.30801.45.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=Paul.McKenney@us.ibm.com \
--cc=dipankar@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome