From: James Morris Use existing sel_make_dir() helper to create booleans directory rather than duplicating the logic. Signed-off-by: James Morris Acked-by: Stephen Smalley Signed-off-by: Andrew Morton --- security/selinux/selinuxfs.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff -puN security/selinux/selinuxfs.c~selinuxfs-cleanups-use-sel_make_dir security/selinux/selinuxfs.c --- devel/security/selinux/selinuxfs.c~selinuxfs-cleanups-use-sel_make_dir 2006-03-11 02:46:26.000000000 -0800 +++ devel-akpm/security/selinux/selinuxfs.c 2006-03-11 02:46:26.000000000 -0800 @@ -1230,14 +1230,10 @@ static int sel_fill_super(struct super_b 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) _