linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yangerkun <yangerkun@huawei.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <rafael@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] debugfs: remove no need inc_nlink
Date: Sat, 22 Dec 2018 16:43:12 +0800	[thread overview]
Message-ID: <16b85779-5939-eff9-72a4-eb1e6159b2e4@huawei.com> (raw)
In-Reply-To: <20181222073205.GA21053@kroah.com>



Greg KH wrote on 2018/12/22 15:32:
> On Sat, Dec 22, 2018 at 11:41:11AM +0800, yangerkun wrote:
>> Remove inc_nlink in debugfs_create_automount, or this inode will never
>> be free.
>>
>> Signed-off-by: yangerkun <yangerkun@huawei.com>
>> ---
>>   fs/debugfs/inode.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
>> index 13b0135..9e6e225 100644
>> --- a/fs/debugfs/inode.c
>> +++ b/fs/debugfs/inode.c
>> @@ -516,8 +516,6 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
>>   	inode->i_op = &simple_dir_inode_operations;
>>   	inode->i_fop = &simple_dir_operations;
>>   
>> -	/* directory inodes start off with i_nlink == 2 (for "." entry) */
>> -	inc_nlink(inode);
> 
> Really?  How did you test this and why does removing this line directly
> go against what the comment says?
So sorry for this, the fuction should be modify is 
debugfs_create_automount. Patch will coming soon.

Thanks,
Kun.

> 
> this feels really wrong...
> 
> greg k-h
> 
> .
> 


  reply	other threads:[~2018-12-23  0:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22  3:41 [PATCH] debugfs: remove no need inc_nlink yangerkun
2018-12-22  7:32 ` Greg KH
2018-12-22  8:43   ` yangerkun [this message]
2018-12-23  1:32 ` [debugfs] a1e6b3dc1c: WARNING:at_fs/inode.c:#drop_nlink kernel test robot

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=16b85779-5939-eff9-72a4-eb1e6159b2e4@huawei.com \
    --to=yangerkun@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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).