diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2008-05-14 20:10:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-05-17 03:30:23 -0400 |
commit | 6793a051fb9311f0f1ab7eafc5a9e69b8a1bd8d4 (patch) | |
tree | e0732f3bf37440015e86ccfd6a0cb5ca79703c5e /kernel | |
parent | fcaf1eb8685a00a99259e138e403841e984385b0 (diff) |
[PATCH] list_for_each_rcu must die: audit
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit_tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 9ef5e0aacc3..f7921a2ecf1 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -172,10 +172,9 @@ static void insert_hash(struct audit_chunk *chunk) | |||
172 | struct audit_chunk *audit_tree_lookup(const struct inode *inode) | 172 | struct audit_chunk *audit_tree_lookup(const struct inode *inode) |
173 | { | 173 | { |
174 | struct list_head *list = chunk_hash(inode); | 174 | struct list_head *list = chunk_hash(inode); |
175 | struct list_head *pos; | 175 | struct audit_chunk *p; |
176 | 176 | ||
177 | list_for_each_rcu(pos, list) { | 177 | list_for_each_entry_rcu(p, list, hash) { |
178 | struct audit_chunk *p = container_of(pos, struct audit_chunk, hash); | ||
179 | if (p->watch.inode == inode) { | 178 | if (p->watch.inode == inode) { |
180 | get_inotify_watch(&p->watch); | 179 | get_inotify_watch(&p->watch); |
181 | return p; | 180 | return p; |