Commit 6793a051fb9311f0f1ab7eafc5a9e69b8a1bd8d4
Committed by
Al Viro
1 parent
fcaf1eb868
Exists in
master
and in
4 other branches
[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>
Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff
kernel/audit_tree.c
... | ... | @@ -172,10 +172,9 @@ |
172 | 172 | struct audit_chunk *audit_tree_lookup(const struct inode *inode) |
173 | 173 | { |
174 | 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) { | |
178 | - struct audit_chunk *p = container_of(pos, struct audit_chunk, hash); | |
177 | + list_for_each_entry_rcu(p, list, hash) { | |
179 | 178 | if (p->watch.inode == inode) { |
180 | 179 | get_inotify_watch(&p->watch); |
181 | 180 | return p; |