From: Youling Tang <youling.tang@linux.dev>
To: Namjae Jeon <linkinjeon@kernel.org>,
Sungjong Seo <sj1557.seo@samsung.com>
Cc: Yuezhang Mo <yuezhang.mo@sony.com>,
Chi Zhiling <chizhiling@163.com>,
exfat@lists.linux.dev, linux-kernel@vger.kernel.org,
Youling Tang <tangyouling@kylinos.cn>
Subject: [PATCH 0/2] exfat: fix iomap mapping vs truncate race
Date: Fri, 13 Nov 2026 16:06:55 +0800 [thread overview]
Message-ID: <20261113080658.2440516-1-youling.tang@linux.dev> (raw)
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
next reply other threads:[~2026-11-13 8:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 8:06 Youling Tang [this message]
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
2026-11-13 8:06 ` [PATCH 2/2] exfat: don't map EXFAT_EOF_CLUSTER as a physical cluster Youling Tang
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=20261113080658.2440516-1-youling.tang@linux.dev \
--to=youling.tang@linux.dev \
--cc=chizhiling@163.com \
--cc=exfat@lists.linux.dev \
--cc=linkinjeon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=tangyouling@kylinos.cn \
--cc=yuezhang.mo@sony.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.