Skip to content

Commit

Permalink
sysctl: Make the directories have nlink == 1
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ebiederm committed Jan 25, 2012
1 parent 1f87f0b commit a15e209
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a15e209

Please sign in to comment.