Skip to content

Commit

Permalink
[PATCH] debugfs: hard link count wrong
Browse files Browse the repository at this point in the history
Fix incorrect nlink of root inode for filesystems that use
simple_fill_super().

Signed-off-by: Vincent Hanquez <vincent@snarc.org>
Cc: Greg KH <gregkh@suse.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Vincent Hanquez authored and Linus Torvalds committed Feb 3, 2006
1 parent ddca248 commit 7656f32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/libfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_op = &simple_dir_inode_operations;
inode->i_fop = &simple_dir_operations;
inode->i_nlink = 2;
root = d_alloc_root(inode);
if (!root) {
iput(inode);
Expand Down

0 comments on commit 7656f32

Please sign in to comment.