Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp5298270ybn; Sat, 28 Sep 2019 17:58:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKHFTGrGdFs+snfzhKQhSwhhHJ01Tb7S6Yps4dTF7tm5Ok1f2l5BCXmTLs7EUl+NvdXcJU X-Received: by 2002:a50:9eac:: with SMTP id a41mr12675294edf.193.1569718726352; Sat, 28 Sep 2019 17:58:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569718726; cv=none; d=google.com; s=arc-20160816; b=ciM+MGByQyMNAgDY24dpXgFgEJxVIMSMNZvD5zCTPd2mfVw7apgwuh2HGukANnr7vn jgKNw+zEeIeYDgu33pgY0U/MrQqH5fSsFDbJywPmbluUGqlTi+pdUSKYRLj9y5XNmNcL BpEcxhYF5PLHRwjAYi6+6Umk9GxYdvmybZQVob7f+CBcUqn2+KSrZUn++iKTDXEyVds1 l1i6te8Qhc5tLNITIFBPqL1XMAxrbI2s/fF54a1lGx0fsTNO8wTeBFNQQQhy9WrvyByN f0b3e2uiS/qtkP1BtyD/qi0yQyF4T8AiVr2fGEQ4cYoVGuP3McRG1BeN6NtXnYvgnLZS fS7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=SHpgl9UAq+4qBKlPfOpTOn53DnAbhz9q8IYnG+44Ixw=; b=yES2fTHSKLcsbeFPT79imk340RNgFfHuaD5KVPBVL5+QU1XJU9W6SxUqx2dgLZVZOD 2vd9dSopqC7OMS4C3acRQVqyci8m6OhPPSh6Na8OxdSu4lYo8t5Kwj8UWACEFudfFWir 3Djnr3gmBd7IkspCYaXgS5pqyWHhkgEe0zF+v0aif/iZKSizYDjg7cxABB1N1NeMutoJ CFQuyL+b2NJ0b7cXp1XQtm7sXfIG5ksy+UficlP5ElKDI0HDZoIQQdxPYXpp4+S/yZGi VsLns48RkQ2CaBHTfj0z2yJmj0krH2xlgpNQpjdSKySSp+b3LXVS4tv8OEJ8UGgGfIUl TzQA== ARC-Authentication-Results: i=1; mx.google.com; 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 b9si4437045edj.0.2019.09.28.17.57.54; Sat, 28 Sep 2019 17:58:46 -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; 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 S1728747AbfI2AxO (ORCPT + 99 others); Sat, 28 Sep 2019 20:53:14 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:49758 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728569AbfI2AxO (ORCPT ); Sat, 28 Sep 2019 20:53:14 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4506EAA3CB7C4192E4B3; Sun, 29 Sep 2019 08:53:12 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 29 Sep 2019 08:53:07 +0800 Subject: Re: [PATCH] f2fs: fix comment of f2fs_evict_inode To: Jaegeuk Kim CC: , , References: <20190925093050.118921-1-yuchao0@huawei.com> <20190927183150.GA54001@jaegeuk-macbookpro.roam.corp.google.com> From: Chao Yu Message-ID: <8c54adaf-163f-fcbe-7731-0c18b12410e0@huawei.com> Date: Sun, 29 Sep 2019 08:53:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190927183150.GA54001@jaegeuk-macbookpro.roam.corp.google.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jaegeuk, On 2019/9/28 2:31, 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. It actually misleads the developer or user. How do you think of: "Called at the last iput() if i_count is zero, and will release all meta/data blocks allocated in the inode if i_nlink is zero" Thanks, > >> + * Called at the last iput() if i_count is zero >> */ >> void f2fs_evict_inode(struct inode *inode) >> { >> -- >> 2.18.0.rc1 > . >