From 5a0b9dcb9c8c331d77ea1bfb0d86b24023493433 Mon Sep 17 00:00:00 2001 From: James Morris Date: Wed, 22 Mar 2006 00:09:16 -0800 Subject: [PATCH] --- yaml --- r: 22509 b: refs/heads/master c: 40e906f8224966ef65756cc75f9999ea2de0523d h: refs/heads/master i: 22507: d4cc6fd33b1714b17e6e3c94ab24eee5aab528b0 v: v3 --- [refs] | 2 +- trunk/security/selinux/selinuxfs.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4dbbdc80edfc..e604d4c0c43a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 68bdcf28a8d245208a02dc9caa60fe13cc1b0ea8 +refs/heads/master: 40e906f8224966ef65756cc75f9999ea2de0523d diff --git a/trunk/security/selinux/selinuxfs.c b/trunk/security/selinux/selinuxfs.c index cc782083d71f..4f7cda67ac0a 100644 --- a/trunk/security/selinux/selinuxfs.c +++ b/trunk/security/selinux/selinuxfs.c @@ -1181,6 +1181,8 @@ static int sel_make_dir(struct super_block *sb, struct dentry *dentry) } 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); out: return ret; @@ -1222,6 +1224,8 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent) 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); bool_dir = dentry; ret = sel_make_bools();