From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14F79C43334 for ; Fri, 22 Jul 2022 06:19:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 839928E0001; Fri, 22 Jul 2022 02:19:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E7C96B0073; Fri, 22 Jul 2022 02:19:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6AEFB8E0001; Fri, 22 Jul 2022 02:19:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 582A16B0072 for ; Fri, 22 Jul 2022 02:19:11 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2AA1C160A7F for ; Fri, 22 Jul 2022 06:19:11 +0000 (UTC) X-FDA: 79713733302.06.66541E4 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf02.hostedemail.com (Postfix) with ESMTP id 8B9E88005A for ; Fri, 22 Jul 2022 06:19:09 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Lpzgm01rmz926f; Fri, 22 Jul 2022 14:15:15 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 22 Jul 2022 14:19:05 +0800 Subject: Re: [PATCH 4/5] hugetlbfs: cleanup some comments in inode.c To: Mike Kravetz CC: , , , References: <20220721131637.6306-1-linmiaohe@huawei.com> <20220721131637.6306-5-linmiaohe@huawei.com> From: Miaohe Lin Message-ID: Date: Fri, 22 Jul 2022 14:19:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658470750; a=rsa-sha256; cv=none; b=xlh8gmQOqYArIC7AjMCPCBHGixEC8dWn13zCVlTziRGStPO9E+YzSH74m8ZL3inUJJfzZv CtXCOmmMHdEE/UUBh3pjB5GNKEqnKaE9N2FU3BCJD4fFpQasYzDUhIwX0lBLOpx49YGEWq J3N7P4xwvrcR7QAwCsAPybUzdKea0s0= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf02.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658470750; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XoXrbiSZvvzKeV+m9bTaHRp0kp7CVxQsSfj+kCst6k8=; b=fIyaKAOMRaw69nTj9rPwa8I25dXVhTBdv902RG13VZ9XDq3e76GBfeBH8TVmttdBh2s810 AaUNazEXjWCsNQCyl7diE9/oNzuqKRwvpXgkP6tP0Qhkr3X8uHoJMiasJ8Sf5YYKVoMfaG ZPDBum0I++bTMfIHNIZjsYolcA2gr+U= Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf02.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 8B9E88005A X-Stat-Signature: kdnm394pyqhfg5i1mwqyityxoz1ogbs7 X-Rspam-User: X-HE-Tag: 1658470749-198115 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2022/7/22 7:23, Mike Kravetz wrote: > On 07/21/22 21:16, Miaohe Lin wrote: >> The function generic_file_buffered_read has been renamed to filemap_read >> since commit 87fa0f3eb267 ("mm/filemap: rename generic_file_buffered_read >> to filemap_read"). Update the corresponding comment. And duplicated taken >> in hugetlbfs_fill_super is removed. >> >> Signed-off-by: Miaohe Lin >> --- >> fs/hugetlbfs/inode.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c >> index aa7a5b8fc724..19fc62a9c2fe 100644 >> --- a/fs/hugetlbfs/inode.c >> +++ b/fs/hugetlbfs/inode.c >> @@ -313,8 +313,8 @@ hugetlbfs_read_actor(struct page *page, unsigned long offset, >> >> /* >> * Support for read() - Find the page attached to f_mapping and copy out the >> - * data. Its *very* similar to generic_file_buffered_read(), we can't use that >> - * since it has PAGE_SIZE assumptions. >> + * data. Its *very* similar to filemap_read(), we can't use that since it has >> + * PAGE_SIZE assumptions. > > Since you are changing the comment, I would just say this provides > functionality similar to filemap_read(). filemap_read is now operating > on folios which may remove any PAGE_SIZE assumptions. One day when > hugetlb is converted to folios it may end up using filemap_read instead > of hugetlbfs_read_actor. Sounds reasonable. > Do you mean changing the comment of hugetlbfs_read_iter like below ? /* * Support for read() - Find the page attached to f_mapping and copy out the * data. This provides functionality similar to filemap_read(). */ static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to) Thanks.