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

[PATCH] selinuxfs cleanups: use sel_make_dir()

Use existing sel_make_dir() helper to create booleans directory rather than
duplicating the logic.
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>
上级 40e906f8
......@@ -1219,14 +1219,10 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent)
if (!dentry)
return -ENOMEM;
inode = sel_make_inode(sb, S_IFDIR | S_IRUGO | S_IXUGO);
if (!inode)
goto out;
inode->i_op = &simple_dir_inode_operations;
inode->i_fop = &simple_dir_operations;
/* directory inodes start off with i_nlink == 2 (for "." entry) */
inode->i_nlink++;
d_add(dentry, inode);
ret = sel_make_dir(sb, dentry);
if (ret)
return ret;
bool_dir = dentry;
ret = sel_make_bools();
if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册