diff options
author | James Morris <jmorris@namei.org> | 2006-03-22 03:09:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 10:54:07 -0500 |
commit | cde174a885821b5eee7e00c8a9a426c9c8186a29 (patch) | |
tree | 95c36020357f26d6a7ebfc3cc9d6d6ac8d250844 /security | |
parent | 40e906f8224966ef65756cc75f9999ea2de0523d (diff) |
[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')
-rw-r--r-- | security/selinux/selinuxfs.c | 12 |
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) | |||
1219 | if (!dentry) | 1219 | if (!dentry) |
1220 | return -ENOMEM; | 1220 | return -ENOMEM; |
1221 | 1221 | ||
1222 | inode = sel_make_inode(sb, S_IFDIR | S_IRUGO | S_IXUGO); | 1222 | ret = sel_make_dir(sb, dentry); |
1223 | if (!inode) | 1223 | if (ret) |
1224 | goto out; | 1224 | return ret; |
1225 | inode->i_op = &simple_dir_inode_operations; | 1225 | |
1226 | inode->i_fop = &simple_dir_operations; | ||
1227 | /* directory inodes start off with i_nlink == 2 (for "." entry) */ | ||
1228 | inode->i_nlink++; | ||
1229 | d_add(dentry, inode); | ||
1230 | bool_dir = dentry; | 1226 | bool_dir = dentry; |
1231 | ret = sel_make_bools(); | 1227 | ret = sel_make_bools(); |
1232 | if (ret) | 1228 | if (ret) |