]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/audit_tree.c
Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / kernel / audit_tree.c
index b898814fe4a08f38fd00f308058a36496d4fa837..f7921a2ecf16c07537971fd62624ef1a40046812 100644 (file)
@@ -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;
@@ -550,7 +549,7 @@ void audit_trim_trees(void)
                        goto skip_it;
 
                root_mnt = collect_mounts(nd.path.mnt, nd.path.dentry);
-               path_release(&nd);
+               path_put(&nd.path);
                if (!root_mnt)
                        goto skip_it;
 
@@ -642,7 +641,7 @@ int audit_add_tree_rule(struct audit_krule *rule)
        if (err)
                goto Err;
        mnt = collect_mounts(nd.path.mnt, nd.path.dentry);
-       path_release(&nd);
+       path_put(&nd.path);
        if (!mnt) {
                err = -ENOMEM;
                goto Err;
@@ -702,7 +701,7 @@ int audit_tag_tree(char *old, char *new)
        if (err)
                return err;
        tagged = collect_mounts(nd.path.mnt, nd.path.dentry);
-       path_release(&nd);
+       path_put(&nd.path);
        if (!tagged)
                return -ENOMEM;
 
@@ -713,7 +712,7 @@ int audit_tag_tree(char *old, char *new)
        }
        mnt = mntget(nd.path.mnt);
        dentry = dget(nd.path.dentry);
-       path_release(&nd);
+       path_put(&nd.path);
 
        if (dentry == tagged->mnt_root && dentry == mnt->mnt_root)
                follow_up(&mnt, &dentry);
@@ -744,13 +743,13 @@ int audit_tag_tree(char *old, char *new)
                spin_lock(&vfsmount_lock);
                if (!is_under(mnt, dentry, &nd)) {
                        spin_unlock(&vfsmount_lock);
-                       path_release(&nd);
+                       path_put(&nd.path);
                        put_tree(tree);
                        mutex_lock(&audit_filter_mutex);
                        continue;
                }
                spin_unlock(&vfsmount_lock);
-               path_release(&nd);
+               path_put(&nd.path);
 
                list_for_each_entry(p, &list, mnt_list) {
                        failed = tag_chunk(p->mnt_root->d_inode, tree);