From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Vincent Hanquez <tab@snarc.org>
Cc: Greg KH <gregkh@suse.de>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
viro@zeniv.linux.org.uk
Subject: Re: [BUG] debugfs: hard link count wrong
Date: Wed, 1 Feb 2006 13:08:40 +0100 [thread overview]
Message-ID: <20060201120840.GD9361@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20060127174332.GA19649@snarc.org>
> looks like all fs that use simple_fill_super got a root inode with
> i_nlink=1 at the start of day.
>
> I've compared with shmem, the nlink is incremented to 2 by a call to
> shmem_get_inode, when filling_super.
>
> I've test the following patch with debugfs and securityfs, and its
> seems to cure the problem.
>
> ------
>
> Fix incorrect nlink of root inode for filesystems that use simple_fill_super
>
> Signed-off-by: Vincent Hanquez <vincent@snarc.org>
>
> diff -Naur a/fs/libfs.c a/fs/libfs.c
> --- a/fs/libfs.c 2006-01-03 03:21:10.000000000 +0000
> +++ b/fs/libfs.c 2006-01-27 17:43:31.000000000 +0000
> @@ -388,6 +388,7 @@
> 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);
>
> -
Sorry to annoy you, but does this patch look ok? Who is actually the
maintainer of libfs?
Thought it would be good to have this fixed...
Thread started here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=113828486029233&w=2
Thanks,
Heiko
prev parent reply other threads:[~2006-02-01 12:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-26 14:11 [BUG] debugfs: hard link count wrong Heiko Carstens
2006-01-27 3:25 ` Greg KH
2006-01-27 5:56 ` Heiko Carstens
2006-01-27 6:38 ` Greg KH
2006-01-27 7:04 ` Heiko Carstens
2006-01-27 7:17 ` Greg KH
2006-01-27 17:43 ` Vincent Hanquez
2006-01-30 6:51 ` Heiko Carstens
2006-02-01 12:08 ` Heiko Carstens [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060201120840.GD9361@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tab@snarc.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).