From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Baolin Wang <baolin.wang@linux.alibaba.com>,
akpm@linux-foundation.org, willy@infradead.org
Cc: lorenzo.stoakes@oracle.com, kas@kernel.org, p.raghav@samsung.com,
mcgrof@kernel.org, dhowells@redhat.com, djwong@kernel.org,
hare@suse.de, da.gomez@samsung.com, dchinner@redhat.com,
brauner@kernel.org, xiangzao@linux.alibaba.com,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm: filemap: fix nr_pages calculation overflow in filemap_map_pages()
Date: Tue, 17 Mar 2026 09:27:57 +0100 [thread overview]
Message-ID: <ed50e523-8834-4a35-8e54-06f3db89e7ee@kernel.org> (raw)
In-Reply-To: <23953888-15d6-4cef-af8c-be15ed6d6e20@linux.alibaba.com>
>> LGTM. I do wonder if we want to add a comment above the file_end,
>> stating that this really must happen before the next_uptodate_folio()
>> to handle concurrent truncation.
>
> Ack. How about adding the following comments?
>
> "
> Recalculate end_pgoff based on file_end before calling
> next_uptodate_folio() to avoid races with concurrent truncation.
> "
Works for me, thanks!
--
Cheers,
David
prev parent reply other threads:[~2026-03-17 8:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 3:45 [RFC PATCH] mm: filemap: fix nr_pages calculation overflow in filemap_map_pages() Baolin Wang
2026-03-13 5:11 ` Dev Jain
2026-03-13 5:14 ` Dev Jain
2026-03-13 5:54 ` Baolin Wang
2026-03-16 12:00 ` Kiryl Shutsemau
2026-03-17 1:04 ` Baolin Wang
2026-03-16 14:06 ` David Hildenbrand (Arm)
2026-03-17 1:16 ` Baolin Wang
2026-03-17 8:27 ` David Hildenbrand (Arm) [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=ed50e523-8834-4a35-8e54-06f3db89e7ee@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=brauner@kernel.org \
--cc=da.gomez@samsung.com \
--cc=dchinner@redhat.com \
--cc=dhowells@redhat.com \
--cc=djwong@kernel.org \
--cc=hare@suse.de \
--cc=kas@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.com \
--cc=willy@infradead.org \
--cc=xiangzao@linux.alibaba.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