All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] exfat: fix iomap mapping vs truncate race
@ 2026-11-13  8:06 Youling Tang
  2026-11-13  8:06 ` [PATCH 1/2] exfat: fix iomap mapping when writeback races with truncate Youling Tang
  0 siblings, 1 reply; 4+ messages in thread
From: Youling Tang @ 2026-11-13  8:06 UTC (permalink / raw)
  To: Namjae Jeon, Sungjong Seo
  Cc: Yuezhang Mo, Chi Zhiling, exfat, linux-kernel, Youling Tang

From: Youling Tang <tangyouling@kylinos.cn>

This series fixes two related problems in the exfat iomap path.

Patch 1 fixes a race between iomap mapping and truncate: i_size was read
twice, and a shrink in between could make the mapping length negative,
which underflowed the cluster count.

Patch 2 fixes the handling of the EXFAT_EOF_CLUSTER sentinel returned by
exfat_map_cluster().  The iomap code used to convert it into a physical
address; it now maps the valid prefix of the range and reports only the
remaining part as a hole, matching the old buffer_head code.

Patch 2 relies on the non-negative length guaranteed by patch 1 for the
hole mapping.

Youling Tang (2):
  exfat: fix iomap mapping when writeback races with truncate
  exfat: don't map EXFAT_EOF_CLUSTER as a physical cluster

 fs/exfat/iomap.c | 38 ++++++++++++++++++++++++++++++++++----
 1 file changed, 34 insertions(+), 4 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-13  8:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261113080013.2432300-1-youling.tang@linux.dev>
2026-11-13  8:00 ` [PATCH 1/2] exfat: fix iomap mapping when writeback races with truncate Youling Tang
2026-11-13  8:00 ` [PATCH 2/2] exfat: don't map EXFAT_EOF_CLUSTER as a physical cluster Youling Tang
2026-11-13  8:06 [PATCH 0/2] exfat: fix iomap mapping vs truncate race Youling Tang
2026-11-13  8:06 ` [PATCH 1/2] exfat: fix iomap mapping when writeback races with truncate Youling Tang
2026-11-13  8:45   ` Chi Zhiling

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.