* [PATCH] list_for_each_rcu must die: audit
@ 2008-04-24 1:21 Paul E. McKenney
2008-05-15 0:10 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Paul E. McKenney @ 2008-04-24 1:21 UTC (permalink / raw)
To: linux-kernel; +Cc: dwmw2, akpm, hch
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] list_for_each_rcu must die: audit
2008-04-24 1:21 [PATCH] list_for_each_rcu must die: audit Paul E. McKenney
@ 2008-05-15 0:10 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2008-05-15 0:10 UTC (permalink / raw)
To: linux-kernel; +Cc: dwmw2, akpm, hch
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. This time with well-formed SOB.
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-15 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-24 1:21 [PATCH] list_for_each_rcu must die: audit Paul E. McKenney
2008-05-15 0:10 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox