All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: akpm@linux-foundation.org, songmuchun@bytedance.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] hugetlbfs: cleanup some comments in inode.c
Date: Thu, 21 Jul 2022 16:23:47 -0700	[thread overview]
Message-ID: <YtngA886kRoFslmS@monkey> (raw)
In-Reply-To: <20220721131637.6306-5-linmiaohe@huawei.com>

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 <linmiaohe@huawei.com>
> ---
>  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.

-- 
Mike Kravetz

>   */
>  static ssize_t hugetlbfs_read_iter(struct kiocb *iocb, struct iov_iter *to)
>  {
> @@ -1383,7 +1383,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,
> -- 
> 2.23.0
> 


  reply	other threads:[~2022-07-21 23:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 13:16 [PATCH 0/5] A few cleanup and fixup patches for hugetlbfs Miaohe Lin
2022-07-21 13:16 ` [PATCH 1/5] hugetlbfs: use helper macro SZ_1{K,M} Miaohe Lin
2022-07-21 23:13   ` Mike Kravetz
2022-07-21 13:16 ` [PATCH 2/5] hugetlbfs: remove unneeded hugetlbfs_ops forward declaration Miaohe Lin
2022-07-21 23:14   ` Mike Kravetz
2022-07-21 13:16 ` [PATCH 3/5] hugetlbfs: remove unneeded header file Miaohe Lin
2022-07-21 23:18   ` Mike Kravetz
2022-07-22  6:12     ` Miaohe Lin
2022-07-21 13:16 ` [PATCH 4/5] hugetlbfs: cleanup some comments in inode.c Miaohe Lin
2022-07-21 23:23   ` Mike Kravetz [this message]
2022-07-22  6:19     ` Miaohe Lin
2022-07-22 21:38       ` Mike Kravetz
2022-07-21 13:16 ` [PATCH 5/5] hugetlbfs: fix confusing hugetlbfs stat Miaohe Lin
2022-07-22  0:28   ` Mike Kravetz
2022-07-22  6:38     ` Miaohe Lin
2022-07-22 22:55       ` Mike Kravetz
2022-07-23  2:56         ` Miaohe Lin
2022-07-25 23:40           ` Mike Kravetz
2022-07-26  2:01             ` Miaohe Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YtngA886kRoFslmS@monkey \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=songmuchun@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.