[PATCH] selinuxfs cleanups: sel_make_avc_files
authorJames Morris <jmorris@namei.org>
Wed, 22 Mar 2006 08:09:19 +0000 (00:09 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 22 Mar 2006 15:54:07 +0000 (07:54 -0800)
Fix copy & paste error in sel_make_avc_files(), removing a supurious call to
d_genocide() in the error path.  All of this will be cleaned up by
kill_litter_super().

Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
security/selinux/selinuxfs.c

index ab7c9935c29a774af4ca01a250e5f72b0374a48c..f321c0c49f46909f1a4aabf1c8b0e5a0bd6595e6 100644 (file)
@@ -1151,22 +1151,19 @@ static int sel_make_avc_files(struct dentry *dir)
                dentry = d_alloc_name(dir, files[i].name);
                if (!dentry) {
                        ret = -ENOMEM;
-                       goto err;
+                       goto out;
                }
 
                inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode);
                if (!inode) {
                        ret = -ENOMEM;
-                       goto err;
+                       goto out;
                }
                inode->i_fop = files[i].ops;
                d_add(dentry, inode);
        }
 out:
        return ret;
-err:
-       d_genocide(dir);
-       goto out;
 }
 
 static int sel_make_dir(struct super_block *sb, struct dentry *dentry)