From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Roman Peniaev <r.peniaev@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 1/3] debugfs: fix automount inode i_nlink references
Date: Mon, 8 Feb 2016 08:35:27 -0800 [thread overview]
Message-ID: <20160208163527.GA10778@kroah.com> (raw)
In-Reply-To: <CACZ9PQUxZOLUjdt-t1N5mWrbWxNyfv6tsgtHCgXCeUa5Vm_ONw@mail.gmail.com>
On Mon, Feb 08, 2016 at 11:28:52AM +0100, Roman Peniaev wrote:
> On Mon, Feb 8, 2016 at 7:38 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Thu, Dec 10, 2015 at 01:47:12PM +0100, Roman Pen wrote:
> >> Directory inodes should start off with i_nlink == 2 (for "." entry).
> >> Of course the same rule should be applied to automount dentries for
> >> child and parent inodes as well.
> >>
> >> Also now automount dentry does fsnotify_mkdir.
> >>
> >> Without this patch kernel complains when sees i_nlink == 0:
> >
> > How can the kernel see this? What did you do to trigger this?
>
> Yes, sorry, I had to be more precise on this.
> That happens on unlinking of automount dentry.
>
> Easily can be reproduced:
>
> autom = debugfs_create_automount("automount", parentd, vfsmount_cb, data);
> BUG_ON(IS_ERR_OR_NULL(autom));
> debugfs_remove(autom);
>
> You will immediately see one warning on attempt to drop_nlink() (which is zero)
> for automount dentry.
Why don't we see this "in the wild" today with the one user of this
function?
> The second warning happens when you unlink 'parentd', because
> debugfs_create_automount() did not increase the nlink for parent
> inode.
>
> Do I need to resend this patch with more precise description?
Yes, please fix up and resend as a stand-alone patch, as it is
independant of your other proposal.
And take off the "RFC" marking, I can never apply a patch with that type
of marking as you obviously don't think it is good enough to be merged,
so why would I? :)
thanks,
greg k-h
next prev parent reply other threads:[~2016-02-08 16:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 12:47 [RFC PATCH 0/3] debugfs: make __debugfs_remove wait for dentry release Roman Pen
2015-12-10 12:47 ` [RFC PATCH 1/3] debugfs: fix automount inode i_nlink references Roman Pen
2016-02-08 6:38 ` Greg Kroah-Hartman
2016-02-08 10:28 ` Roman Peniaev
2016-02-08 16:35 ` Greg Kroah-Hartman [this message]
2016-02-09 10:34 ` Roman Peniaev
2015-12-10 12:47 ` [RFC PATCH 2/3] debugfs: put private data to i_private for automount inode Roman Pen
2015-12-10 12:47 ` [RFC PATCH 3/3] debugfs: make __debugfs_remove wait for dentry release Roman Pen
2016-02-08 6:39 ` Greg Kroah-Hartman
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=20160208163527.GA10778@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=r.peniaev@gmail.com \
/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