Re: [PATCH 3/4] mm/filemap: don't drop dropbehind folios with interrupts disabled

From: sashiko-bot

Date: Thu Dec 03 2026 - 09:26:20 EST


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mm/filemap: inaccurate Fixes trailer in folio_end_dropbehind()
fix
--

commit fa3358ee2feeec78d1d81bdc2f73fcecfd3a6f0b
Author: Usama Arif <usama.arif@xxxxxxxxx>

> mm/filemap: don't drop dropbehind folios with interrupts disabled
>
> Forced-threaded interrupt handlers pass the in_task() check in
> folio_end_dropbehind() but run with interrupts disabled on !PREEMPT_RT,
> and invalidating the folio turns them back on. ext4 RWF_DONTCACHE
> overwrites hit this with threadirqs until commit 7d7c9c83c822 ("ext4:
> complete dropbehind writeback in task context"), and folios marked
> dropbehind after their writeback was submitted still can.
>
> Skip the drop when interrupts are disabled. The folio stays cached, as
> it does when the completion runs in hardirq context.
>
> Fixes: ae21c0c0ac56 ("ext4: support uncached buffered I/O")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Usama Arif <usama.arif@xxxxxxxxx>

[Severity: Low]
Should the Fixes tag reference fb7d3bc41493 ("mm/filemap: drop
streaming/uncached pages when writeback completes") instead?

ae21c0c0ac56 ("ext4: support uncached buffered I/O") only enabled
FOP_DONTCACHE in ext4, whereas the in_task() check guarding
folio_unmap_invalidate() in mm/filemap.c was introduced by fb7d3bc41493
("mm/filemap: drop streaming/uncached pages when writeback completes").

--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202142513.2951661-1-usama.arif@xxxxxxxxx?part=3