[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACZ9PQUxZOLUjdt-t1N5mWrbWxNyfv6tsgtHCgXCeUa5Vm_ONw@mail.gmail.com>
Date: Mon, 8 Feb 2016 11:28:52 +0100
From: Roman Peniaev <r.peniaev@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 1/3] debugfs: fix automount inode i_nlink references
On Mon, Feb 8, 2016 at 7:38 AM, Greg Kroah-Hartman
<gregkh@...uxfoundation.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.
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?
--
Roman
>
> thanks,
>
> greg k-h
Powered by blists - more mailing lists