提交 d6aafa65 编写于 作者: J James Morris 提交者: Linus Torvalds

[PATCH] selinuxfs cleanups: sel_make_avc_files

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: NJames Morris <jmorris@namei.org>
Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 253a8b1d
...@@ -1151,22 +1151,19 @@ static int sel_make_avc_files(struct dentry *dir) ...@@ -1151,22 +1151,19 @@ static int sel_make_avc_files(struct dentry *dir)
dentry = d_alloc_name(dir, files[i].name); dentry = d_alloc_name(dir, files[i].name);
if (!dentry) { if (!dentry) {
ret = -ENOMEM; ret = -ENOMEM;
goto err; goto out;
} }
inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode); inode = sel_make_inode(dir->d_sb, S_IFREG|files[i].mode);
if (!inode) { if (!inode) {
ret = -ENOMEM; ret = -ENOMEM;
goto err; goto out;
} }
inode->i_fop = files[i].ops; inode->i_fop = files[i].ops;
d_add(dentry, inode); d_add(dentry, inode);
} }
out: out:
return ret; return ret;
err:
d_genocide(dir);
goto out;
} }
static int sel_make_dir(struct super_block *sb, struct dentry *dentry) static int sel_make_dir(struct super_block *sb, struct dentry *dentry)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册