From: Vincent Hanquez Date: Fri, 3 Feb 2006 11:04:48 +0000 (-0800) Subject: [PATCH] debugfs: hard link count wrong X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7656f328f68b351a8bb71ad465cedc8d0a039f9e;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 63c020e6589e..71fd08fa4103 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);