Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2815912imu; Sun, 23 Dec 2018 08:25:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN44oXvRM8/iu/JZ+gHe24vfknVOVJ7SLqMtoNMkgbE2QDVptiR+RBuMD5HdbRCeikFIXXUB X-Received: by 2002:a17:902:b943:: with SMTP id h3mr10262917pls.12.1545582302090; Sun, 23 Dec 2018 08:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545582302; cv=none; d=google.com; s=arc-20160816; b=YcFJtgBq8HbW/DUR+nkTK83aTTQaoSRr+4+5AjU2UNat0dDE1ai8vnXfr9TlymHuTL +FDPFZSRaogU1TMDTCXog4NNg+Fl7OO++g1KtORZppP70ib25Xuj0A05o6uDR9PJWOh0 HMQ3p5mQxXyk4yT3JkPR6VQTvG/vciSfJIU7H4ze5WqsHIxjhum6/9jTvz5NcYFaqkgN GdrD14ZE3/5/Z3lvJIMMoieBY/eezoZ13ykaCG6U38yubRMssADAsJe6BDxjPO17+C1A iwaLv4JJhdoJtdMEDuIc6kOIaGwQjkc+KY3YOdyyo4B5raWhUa9v4doDGvZ/T9Zek1PH lU+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tg0/NDQJnuwA1/tCfArx1ixnoEcfWZRmwzbo++Cdp2g=; b=wLq/sbXGJxelf6sRfj2nKYncrBet7N4T08FQHppCfjrSqepKOkxqCMUg1FX3Mpgp5S qMKY1fboB8th9FKn2aCF8RbQtHmaRQ9iRfLehLqOEYzxAyeG3ZW/tTxHIz5DRoCKOXJs xNuS0rXju9ITqqId6hJHNTgJ1UQFYGx7okMWVIA/njmj72EB4PhQQXLljJJxRJTMIozu ZjkEJ+jPDv0Ly7dsdNL/9Cx7E0ekekyCcmMNjTx+tc+G8Gr4h2qcVukWoKVC+4CgCTjs dLRIb7Dc7GpYZJovAFhx/SZIz5pCLe7weLY4KVB45dCAFw8sI4WstAcSKmI3FfyfY/NU K5rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K5K8jrMB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si25353141pgj.142.2018.12.23.08.24.46; Sun, 23 Dec 2018 08:25:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K5K8jrMB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404599AbeLVRsV (ORCPT + 99 others); Sat, 22 Dec 2018 12:48:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:34194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390019AbeLVRrO (ORCPT ); Sat, 22 Dec 2018 12:47:14 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3050221934; Sat, 22 Dec 2018 07:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545463929; bh=VUn4BJAyFZuF6+i0cEMKpogtsh1RirfR3yR6ObvsDlA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K5K8jrMBHETtAx3P7CzaNEg5ZTusaOh2vgX1dvzqZN2nwnJG2PAASUKJwmZUSa6sX 6z5+gAYl5TJXYb8F87cLJ5taRa/ialQJH27/Bsk8EqMicP4himBztrD9sll/CZiric lDuMPpkG8aS41OCDNjaZ1vxDdVrZZpPwDwREztdM= Date: Sat, 22 Dec 2018 08:32:05 +0100 From: Greg KH To: yangerkun Cc: rafael@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] debugfs: remove no need inc_nlink Message-ID: <20181222073205.GA21053@kroah.com> References: <20181222034111.15214-1-yangerkun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181222034111.15214-1-yangerkun@huawei.com> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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? this feels really wrong... greg k-h