From patchwork Tue Jul 26 14:29:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12929378 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 D719DC00140 for ; Tue, 26 Jul 2022 14:29:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E9CA8E0001; Tue, 26 Jul 2022 10:29:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 970C3940007; Tue, 26 Jul 2022 10:29:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 838748E0006; Tue, 26 Jul 2022 10:29:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 726308E0001 for ; Tue, 26 Jul 2022 10:29:42 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3C197AB99D for ; Tue, 26 Jul 2022 14:29:42 +0000 (UTC) X-FDA: 79729484604.12.0902CEF Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf16.hostedemail.com (Postfix) with ESMTP id 7B11D1800BF for ; Tue, 26 Jul 2022 14:29:41 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4LsfNy0G3Sz1M89Z; Tue, 26 Jul 2022 22:26:42 +0800 (CST) Received: from huawei.com (10.175.124.27) 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; Tue, 26 Jul 2022 22:29:33 +0800 From: Miaohe Lin To: , , CC: , , Subject: [PATCH v2 4/5] hugetlbfs: cleanup some comments in inode.c Date: Tue, 26 Jul 2022 22:29:17 +0800 Message-ID: <20220726142918.51693-5-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220726142918.51693-1-linmiaohe@huawei.com> References: <20220726142918.51693-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658845781; 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=gcVkksLaIa0daKB7qix0ii0InSJE+o9RpPioxv9G1tU=; b=nUrHNlzYawkk+HMKBfL2hVFFfIOo/ejaMqV2eISrrdMYIXfd9fNxKIp9478M+pBSSDlyCT nzwChkfBe9k6X8wgmjmC6yPwnVcpnhk6yXJptt/2pi+/GJQo6+uVQNTWeTw0frKjmlyMyi CYl0sucL6LCd5ThirArK2iep4jLZ758= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658845781; a=rsa-sha256; cv=none; b=1BzDzw7e+iT7WZo8gOFsFh4UeCm1Cn4EgP0J5+NKsU5xJrxod4PspuV5mrAFiGPGIVwwp+ wsmEkTHneIN++8OUj5LSjEbovhjAXsslhHW9CkfOzffVw5OyqSceibGSM+J3F1G9BSZvrI dcoZrjN7SJqJOdgMxVxe35Q0L59v+0w= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Authentication-Results: imf16.hostedemail.com; dkim=none; spf=pass (imf16.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-Rspamd-Queue-Id: 7B11D1800BF X-Rspamd-Server: rspam05 X-Stat-Signature: 7aub1o3kaqp6motj9eksa9qruzxhua4n X-HE-Tag: 1658845781-173784 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: 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 Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song --- fs/hugetlbfs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index aa7a5b8fc724..96c60aa3ab47 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -313,8 +313,7 @@ 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. This provides functionality similar to filemap_read(). */ static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to) { @@ -1383,7 +1382,7 @@ hugetlbfs_fill_super(struct super_block *sb, struct fs_context *fc) /* * Allocate and initialize subpool if maximum or minimum size is * specified. Any needed reservations (for minimum size) are taken - * taken when the subpool is created. + * when the subpool is created. */ if (ctx->max_hpages != -1 || ctx->min_hpages != -1) { sbinfo->spool = hugepage_new_subpool(ctx->hstate,