Skip to content

Commit

Permalink
[PATCH] list_for_each_rcu must die: audit
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Paul E. McKenney authored and Al Viro committed May 17, 2008
1 parent fcaf1eb commit 6793a05
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/audit_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,9 @@ static void insert_hash(struct audit_chunk *chunk)
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;
Expand Down

0 comments on commit 6793a05

Please sign in to comment.