From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: dwmw2@infradead.org, akpm@linux-foundation.org, hch@infradead.org
Subject: [PATCH] list_for_each_rcu must die: audit
Date: Wed, 23 Apr 2008 18:21:50 -0700 [thread overview]
Message-ID: <20080424012150.GA15350@linux.vnet.ibm.com> (raw)
All uses of list_for_each_rcu() can be profitably replaced by the
easier-to-use list_for_each_entry_rcu(). This patch makes this change
for the Audit system, in preparation for removing the list_for_each_rcu()
API entirely.
Signed_off_by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
audit_tree.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff -urpNa -X dontdiff linux-2.6.25/kernel/audit_tree.c linux-2.6.25-lfer-audit/kernel/audit_tree.c
--- linux-2.6.25/kernel/audit_tree.c 2008-04-16 19:49:44.000000000 -0700
+++ linux-2.6.25-lfer-audit/kernel/audit_tree.c 2008-04-23 18:09:16.000000000 -0700
@@ -172,10 +172,9 @@ static void insert_hash(struct audit_chu
struct audit_chunk *audit_tree_lookup(const struct inode *inode)
{
struct list_head *list = chunk_hash(inode);
- struct list_head *pos;
+ struct audit_chunk *p;
- list_for_each_rcu(pos, list) {
- struct audit_chunk *p = container_of(pos, struct audit_chunk, hash);
+ list_for_each_entry_rcu(p, list, hash) {
if (p->watch.inode == inode) {
get_inotify_watch(&p->watch);
return p;
next reply other threads:[~2008-04-24 1:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 1:21 Paul E. McKenney [this message]
2008-05-15 0:10 ` [PATCH] list_for_each_rcu must die: audit Paul E. McKenney
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=20080424012150.GA15350@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=hch@infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.