Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3834095ybn; Fri, 27 Sep 2019 12:04:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuwz0ytS16zD/SpqUF2l6LmB6jhL3PVy1jpLE/wkPwGMxo4mw3BYpqQ7UvyYXpgeofZsrE X-Received: by 2002:a17:906:c47:: with SMTP id t7mr9146639ejf.133.1569611045442; Fri, 27 Sep 2019 12:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569611045; cv=none; d=google.com; s=arc-20160816; b=DwMU1cdFKVELg5kZTx0SLEnIzjdPYYwSN0czTJR/fiALwWIeI4X/ch8Wh59jp696SS GLS3D8cwYSkvGgsTTn0YT8MhfoZNs65UzPSNrtdgnpJdbrGu4zN8h5b57OXkB2M995U2 V0KH155M0YVwSRnuDOZjWQYqO+UEahwklEQxsXtK0cvA0tLqRMoD4Spoq/LJpU3szUUO ku4kyebBYCNPGYRLE4d6ZfUCh3fKUZIjSiPoQUU7J++54TFWIZtBE/iSKiDKibWMBRxH oMJ3NLkuPvIcHn5xR58uy8XqZmKsEru7/LVDL1YaTS6QjB1fFGTkogEMSWSd3Anv7OB6 AgCA== 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=8boG8ajnLNdx3Q6HR+50f0OISCdkUqomEEROs7B0REM=; b=hksUwa3GJlnAEDFAh4ml4Us4drxq4HQDGYZjr6EFubWg1qG+mE/IwstFFC3OvQ5m/K VqSXesfjOJnANDW1aa4JJi270dR34yoaX+9WOEoXvJtu6hcMwiu2MBkY9vRYOcpicIRp U1t1ri0SxYEk6pS6sHmsioQh79tyh3v3Cttf//ggSakw1gLUWty3hRpRiHCikKhkzZJH z4t+hs+csHZ+wEBB0oHohTwLx3Wqluqg/Nkr4grWfhyvcNbujlfKpoGxR+kLzAXUeCgs MSZ4EfxSJ3gznyq9I7M9WiwwbMxLK6Wqew8/+GBzZhhwuK6H00/PTRzmbP5D1qb+k2ME UFDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=E43mdeAE; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d43si2205839edb.73.2019.09.27.12.03.41; Fri, 27 Sep 2019 12:04:05 -0700 (PDT) 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=@aol.com header.s=a2048 header.b=E43mdeAE; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728241AbfI0TBT (ORCPT + 99 others); Fri, 27 Sep 2019 15:01:19 -0400 Received: from sonic301-22.consmr.mail.gq1.yahoo.com ([98.137.64.148]:41366 "EHLO sonic301-22.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbfI0TBS (ORCPT ); Fri, 27 Sep 2019 15:01:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1569610877; bh=8boG8ajnLNdx3Q6HR+50f0OISCdkUqomEEROs7B0REM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=E43mdeAEx8XIZE7dRNOmsNYstcUNfkuxB8V1FQ/PIwekMTUghEnkMPovA2mDaP41xYa1CbKoL0n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.79DAwNG3xvQQD6J08Z6ksrf6b 5Bpw5yhYC6x5o4QNtBqDjED4g4dV5UDyUFOA.85u3ohyVsdWWB8XbPRtp_n9YjFPv5333lJ1A602 MGGlRXrgRG9x9N7ec4KE_Xiq67lxg0xM47adrMMHxq8rZP_iIHj9CvBJk.fEj.pZBEHpjtvKLFr0 24hx7UBT0jvES4wFIBEpoYnsFGSTqexwbQhzzvV.UP3Dlr1fdoxc_JcTt58el3Y0HYRm4DtD.bGi xevgj4XkAuFt9Kh3tmys.ERqE.4IikUYVMrVLJruVNmpAIVD0kGigPgMtoxXAvXKnhVpY8yqiSAo _WREP_t0sRa9aWjF1R1t3Bc_97nndNkLAf8VMRFwYcjjyFkNSyYEAUDwjGzwYoVtAQSt.XI8c_Wg vfBquSiJtV2uScilya0toff9qisQEU2loe.L6lMv0XgnZiH1uzQGNUAev7Y7ZJV5I4dC8t5JWHBG 3Hmecs27pGGvLrVemAJQhn3eTaKpodm3_2jmXFq60dju4hwbnyjHXdsXb Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Fri, 27 Sep 2019 19:01:17 +0000 Received: by smtp413.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 41ea480fdb5c16ffe76a1010a62f6533; Fri, 27 Sep 2019 19:01:14 +0000 (UTC) Date: Sat, 28 Sep 2019 03:01:10 +0800 From: Gao Xiang To: Jaegeuk Kim Cc: Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, chao@kernel.org Subject: Re: [PATCH] f2fs: fix comment of f2fs_evict_inode Message-ID: <20190927190106.GA27964@hsiangkao-HP-ZHAN-66-Pro-G1> References: <20190925093050.118921-1-yuchao0@huawei.com> <20190927183150.GA54001@jaegeuk-macbookpro.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190927183150.GA54001@jaegeuk-macbookpro.roam.corp.google.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jaegeuk, On Fri, Sep 27, 2019 at 11:31:50AM -0700, Jaegeuk Kim wrote: > Hi Chao, > > On 09/25, Chao Yu wrote: > > evict() should be called once i_count is zero, rather than i_nlinke > > is zero. > > > > Reported-by: Gao Xiang > > Signed-off-by: Chao Yu > > --- > > fs/f2fs/inode.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c > > index db4fec30c30d..8262f4a483d3 100644 > > --- a/fs/f2fs/inode.c > > +++ b/fs/f2fs/inode.c > > @@ -632,7 +632,7 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) > > } > > > > /* > > - * Called at the last iput() if i_nlink is zero > > I don't think this comment is wrong. You may be able to add on top of this. Actually I don't really care what this line means, but someone really told me that .evict_inode() is called on inode is finally removed because he saw this line. In practice, I have no idea what the above line (especially the word i_nlink == 0) mainly emphasizes, just from some documentation (not even refer some code): Documentation/filesystems/porting.rst 326 **mandatory** 327 328 ->clear_inode() and ->delete_inode() are gone; ->evict_inode() should 329 be used instead. It gets called whenever the inode is evicted, whether it has 330 remaining links or not. And it seems it's the same comment exists in ext2/ext4. But yes, it's up to you. However, it misleaded someone and I had to explain more about this. Thanks, Gao Xiang > > > + * Called at the last iput() if i_count is zero > > */ > > void f2fs_evict_inode(struct inode *inode) > > { > > -- > > 2.18.0.rc1