Skip to content

Commit

Permalink
[PATCH] selinuxfs cleanups: use sel_make_dir()
Browse files Browse the repository at this point in the history
Use existing sel_make_dir() helper to create booleans directory rather than
duplicating the logic.

Signed-off-by: James Morris <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
James Morris authored and Linus Torvalds committed Mar 22, 2006
1 parent 40e906f commit cde174a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions security/selinux/selinuxfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cde174a

Please sign in to comment.