[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: 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>
This commit is contained in:
James Morris 2006-03-22 00:09:17 -08:00 committed by Linus Torvalds
parent 40e906f822
commit cde174a885

View File

@ -1219,14 +1219,10 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent)
if (!dentry) if (!dentry)
return -ENOMEM; return -ENOMEM;
inode = sel_make_inode(sb, S_IFDIR | S_IRUGO | S_IXUGO); ret = sel_make_dir(sb, dentry);
if (!inode) if (ret)
goto out; return ret;
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);
bool_dir = dentry; bool_dir = dentry;
ret = sel_make_bools(); ret = sel_make_bools();
if (ret) if (ret)