From: Vincent Hanquez Date: Fri, 3 Feb 2006 11:04:48 +0000 (-0800) Subject: [PATCH] debugfs: hard link count wrong X-Git-Tag: v2.6.16-rc3~224 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7656f328f68b351a8bb71ad465cedc8d0a039f9e;p=linux-2.6-omap-h63xx.git [PATCH] debugfs: hard link count wrong Fix incorrect nlink of root inode for filesystems that use simple_fill_super(). Signed-off-by: Vincent Hanquez Cc: Greg KH Cc: Heiko Carstens Cc: Al Viro Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/libfs.c b/fs/libfs.c index 63c020e6589..71fd08fa410 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -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);