diff options
Diffstat (limited to 'security/selinux/selinuxfs.c')
-rw-r--r-- | security/selinux/selinuxfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index cc782083d71f..4f7cda67ac0a 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
@@ -1181,6 +1181,8 @@ static int sel_make_dir(struct super_block *sb, struct dentry *dentry) | |||
1181 | } | 1181 | } |
1182 | inode->i_op = &simple_dir_inode_operations; | 1182 | inode->i_op = &simple_dir_inode_operations; |
1183 | inode->i_fop = &simple_dir_operations; | 1183 | inode->i_fop = &simple_dir_operations; |
1184 | /* directory inodes start off with i_nlink == 2 (for "." entry) */ | ||
1185 | inode->i_nlink++; | ||
1184 | d_add(dentry, inode); | 1186 | d_add(dentry, inode); |
1185 | out: | 1187 | out: |
1186 | return ret; | 1188 | return ret; |
@@ -1222,6 +1224,8 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent) | |||
1222 | goto out; | 1224 | goto out; |
1223 | inode->i_op = &simple_dir_inode_operations; | 1225 | inode->i_op = &simple_dir_inode_operations; |
1224 | inode->i_fop = &simple_dir_operations; | 1226 | inode->i_fop = &simple_dir_operations; |
1227 | /* directory inodes start off with i_nlink == 2 (for "." entry) */ | ||
1228 | inode->i_nlink++; | ||
1225 | d_add(dentry, inode); | 1229 | d_add(dentry, inode); |
1226 | bool_dir = dentry; | 1230 | bool_dir = dentry; |
1227 | ret = sel_make_bools(); | 1231 | ret = sel_make_bools(); |