sysctl: Make the directories have nlink == 1
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 8 Jan 2012 08:16:29 +0000 (00:16 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Jan 2012 00:37:55 +0000 (16:37 -0800)
I goofed when I made sysctl directories have nlink == 0.
nlink == 0 means the directory has been deleted.
nlink == 1 meands a directory does not count subdirectories.

Use the default nlink == 1 for sysctl directories.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
fs/proc/proc_sysctl.c

index 06e6f10ee8ec6611175fcb982e146a0923b3f75b..f6aa75111b41ef29fb11054d91b38f8c007d575a 100644 (file)
@@ -253,7 +253,6 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
                inode->i_fop = &proc_sys_file_operations;
        } else {
                inode->i_mode |= S_IFDIR;
-               clear_nlink(inode);
                inode->i_op = &proc_sys_dir_operations;
                inode->i_fop = &proc_sys_dir_file_operations;
        }