linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jiaqi Yan <jiaqiyan@google.com>
To: "David Hildenbrand (arm)" <david@kernel.org>,
	jane.chu@oracle.com, muchun.song@linux.dev
Cc: osalvador@suse.de, william.roche@oracle.com, linux-mm@kvack.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] fs: hugetlb: simplify remove_inode_hugepages() return type
Date: Wed, 4 Feb 2026 13:49:46 -0800	[thread overview]
Message-ID: <CACw3F53e8afd4RmMXaQ2RZCP-e=r+2ZmGYJc1qTZXZ+amU+zdQ@mail.gmail.com> (raw)
In-Reply-To: <f3fa9edc-370c-4087-a201-6419185a0e72@kernel.org>

Thanks for your reviews, Jane, Muchun, and David

On Wed, Feb 4, 2026 at 3:41 AM David Hildenbrand (arm) <david@kernel.org> wrote:
>
> On 2/3/26 00:36, Jiaqi Yan wrote:
> > When remove_inode_hugepages is introduced in
> > commit c86272287bc6 ("hugetlb: create remove_inode_single_folio to remove single file folio")
> > it used to return a boolean to indicate if it bailed out due to race with
> > page faults. However, since the race is already solved by [1],
> > remove_inode_hugepages() doesn't have any path to return false anymore.
> >
> > Simplify remove_inode_hugepages() return type to void, remove the
> > unnecessary ret variable, and adjust the call site in
> > remove_inode_hugepages(). No functional change in this commit.
> >
> > [1] https://lore.kernel.org/all/20220914221810.95771-10-mike.kravetz@oracle.com
> >
> > Suggested-by: Jane Chu <jane.chu@oracle.com>
> > Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
> > ---
> >   fs/hugetlbfs/inode.c | 18 +++++++-----------
> >   1 file changed, 7 insertions(+), 11 deletions(-)
> >
> > diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
> > index 3b4c152c5c73a..83d71cea7e384 100644
> > --- a/fs/hugetlbfs/inode.c
> > +++ b/fs/hugetlbfs/inode.c
> > @@ -515,13 +515,11 @@ hugetlb_vmdelete_list(struct rb_root_cached *root, pgoff_t start, pgoff_t end,
> >    * Called with hugetlb fault mutex held.
> >    * Returns true if page was actually removed, false otherwise.
> >    */
> > -static bool remove_inode_single_folio(struct hstate *h, struct inode *inode,
> > -                                     struct address_space *mapping,
> > -                                     struct folio *folio, pgoff_t index,
> > -                                     bool truncate_op)
> > +static void remove_inode_single_folio(struct hstate *h, struct inode *inode,
> > +                                   struct address_space *mapping,
> > +                                   struct folio *folio, pgoff_t index,
> > +                                   bool truncate_op)
>
> While you are touching this, this would look better with two-tab
> alignment on second parameter line.

For sure, it is adjusted in v2:
https://lore.kernel.org/linux-mm/20260204214741.3161520-1-jiaqiyan@google.com

>
> Acked-by: David Hildenbrand (arm) <david@kernel.org>
>
> --
> Cheers,
>
> David


      reply	other threads:[~2026-02-04 21:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 23:36 Jiaqi Yan
2026-02-04  4:26 ` jane.chu
2026-02-04  6:06 ` [PATCH v1] " Muchun Song
2026-02-04 11:41 ` [PATCH v1] fs: " David Hildenbrand (arm)
2026-02-04 21:49   ` Jiaqi Yan [this message]

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='CACw3F53e8afd4RmMXaQ2RZCP-e=r+2ZmGYJc1qTZXZ+amU+zdQ@mail.gmail.com' \
    --to=jiaqiyan@google.com \
    --cc=david@kernel.org \
    --cc=jane.chu@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=william.roche@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox