public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] exfat: unify FAT chain walking helpers
@ 2026-04-01  7:11 Chi Zhiling
  2026-04-01  7:11 ` [PATCH v2 1/6] exfat: fix incorrect directory checksum after rename to shorter name Chi Zhiling
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Chi Zhiling @ 2026-04-01  7:11 UTC (permalink / raw)
  To: Namjae Jeon, Sungjong Seo, Yuezhang Mo
  Cc: linux-fsdevel, linux-kernel, Chi Zhiling

From: Chi Zhiling <chizhiling@kylinos.cn>

This series introduces and uses two new helpers to simplify FAT chain
walking logic across the exfat driver:

1. exfat_fat_walk - walks FAT chain by a given step, handling both
   ALLOC_NO_FAT_CHAIN and ALLOC_FAT_CHAIN modes

2. exfat_chain_advance - walks an exfat_chain structure by a given step,
   updating both ->dir and ->size fields atomically with proper boundary
   checking

These helpers replace open-coded cluster walking logic in dir.c, namei.c
and inode.c, improving code readability and ensuring consistent error
handling for corrupted FAT chains.

Also includes a fix for incorrect directory checksum when renaming a
file to a shorter name.

---

Changes in v2: rework exfat_chain_advance()

v1:https://lore.kernel.org/linux-fsdevel/20260331091113.20882-1-chizhiling@163.com/


Chi Zhiling (6):
  exfat: fix incorrect directory checksum after rename to shorter name
  exfat: introduce exfat_fat_walk helper
  exfat: use exfat_fat_walk helper to simplify fat entry walking
  exfat: remove NULL cache pointer case in exfat_ent_get
  exfat: introduce exfat_chain_advance helper
  exfat: use exfat_chain_advance helper

 fs/exfat/dir.c      | 111 +++++++++-----------------------------------
 fs/exfat/exfat_fs.h |  40 +++++++++++++++-
 fs/exfat/fatent.c   |  23 ++++-----
 fs/exfat/inode.c    |  11 +----
 fs/exfat/namei.c    |  29 +++---------
 5 files changed, 79 insertions(+), 135 deletions(-)


base-commit: 4129a3a2751cba8511cee5d13145223662a8e019
-- 
2.43.0


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

end of thread, other threads:[~2026-04-03  4:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-01  7:11 [PATCH v2 0/6] exfat: unify FAT chain walking helpers Chi Zhiling
2026-04-01  7:11 ` [PATCH v2 1/6] exfat: fix incorrect directory checksum after rename to shorter name Chi Zhiling
2026-04-01  7:11 ` [PATCH v2 2/6] exfat: introduce exfat_fat_walk helper Chi Zhiling
2026-04-03  2:34   ` Yuezhang.Mo
2026-04-03  2:44     ` Chi Zhiling
2026-04-01  7:11 ` [PATCH v2 3/6] exfat: use exfat_fat_walk helper to simplify fat entry walking Chi Zhiling
2026-04-02 14:22   ` Sungjong Seo
2026-04-03  2:43     ` Chi Zhiling
2026-04-01  7:11 ` [PATCH v2 4/6] exfat: remove NULL cache pointer case in exfat_ent_get Chi Zhiling
2026-04-01  7:11 ` [PATCH v2 5/6] exfat: introduce exfat_chain_advance helper Chi Zhiling
2026-04-03  2:34   ` Yuezhang.Mo
2026-04-03  2:47     ` Chi Zhiling
2026-04-03  3:33       ` Yuezhang.Mo
2026-04-03  4:28         ` Chi Zhiling
2026-04-01  7:11 ` [PATCH v2 6/6] exfat: use " Chi Zhiling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox