summaryrefslogtreecommitdiffstats
path: root/security/selinux/selinuxfs.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2006-03-22 00:09:17 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 07:54:07 -0800
commitcde174a885821b5eee7e00c8a9a426c9c8186a29 (patch)
tree95c36020357f26d6a7ebfc3cc9d6d6ac8d250844 /security/selinux/selinuxfs.c
parent40e906f8224966ef65756cc75f9999ea2de0523d (diff)
downloadtalos-obmc-linux-cde174a885821b5eee7e00c8a9a426c9c8186a29.tar.gz
talos-obmc-linux-cde174a885821b5eee7e00c8a9a426c9c8186a29.zip
[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>
Diffstat (limited to 'security/selinux/selinuxfs.c')
-rw-r--r--security/selinux/selinuxfs.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 4f7cda67ac0a..f898080b9493 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -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)
OpenPOWER on IntegriCloud