summaryrefslogtreecommitdiffstats
path: root/kernel/audit_tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2008-05-15 02:10:12 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2008-05-17 09:30:23 +0200
commit6793a051fb9311f0f1ab7eafc5a9e69b8a1bd8d4 (patch)
treee0732f3bf37440015e86ccfd6a0cb5ca79703c5e /kernel/audit_tree.c
parent[patch 1/1] audit_send_reply(): fix error-path memory leak (diff)
downloadlinux-6793a051fb9311f0f1ab7eafc5a9e69b8a1bd8d4.tar.xz
linux-6793a051fb9311f0f1ab7eafc5a9e69b8a1bd8d4.zip
[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/audit_tree.c')
-rw-r--r--kernel/audit_tree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 9ef5e0aacc3c..f7921a2ecf16 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -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;