mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chi Zhiling <chizhiling@163.com>
To: Namjae Jeon <linkinjeon@kernel.org>,
	Sungjong Seo <sj1557.seo@samsung.com>,
	Yuezhang Mo <yuezhang.mo@sony.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chi Zhiling <chizhiling@kylinos.cn>
Subject: [PATCH v1 0/6] exfat: unify FAT chain walking helpers
Date: Tue, 31 Mar 2026 17:11:07 +0800	[thread overview]
Message-ID: <20260331091113.20882-1-chizhiling@163.com> (raw)

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.

The base commit is exfat/dev without iomap changes


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 |  49 ++++++++++++++++++-
 fs/exfat/fatent.c   |  23 ++++-----
 fs/exfat/inode.c    |  11 +----
 fs/exfat/namei.c    |  29 +++---------
 5 files changed, 88 insertions(+), 135 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-03-31  9:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31  9:11 Chi Zhiling [this message]
2026-03-31  9:11 ` [PATCH v1 1/6] exfat: fix incorrect directory checksum after rename to shorter name Chi Zhiling
2026-03-31  9:11 ` [PATCH v1 2/6] exfat: introduce exfat_fat_walk helper Chi Zhiling
2026-03-31  9:11 ` [PATCH v1 3/6] exfat: use exfat_fat_walk helper to simplify fat entry walking Chi Zhiling
2026-03-31  9:11 ` [PATCH v1 4/6] exfat: remove NULL cache pointer case in exfat_ent_get Chi Zhiling
2026-03-31  9:11 ` [PATCH v1 5/6] exfat: introduce exfat_chain_advance helper Chi Zhiling
2026-03-31  9:11 ` [PATCH v1 6/6] exfat: use " Chi Zhiling
2026-03-31 15:27 ` [syzbot ci] Re: exfat: unify FAT chain walking helpers syzbot ci
2026-04-01  2:45   ` Chi Zhiling

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=20260331091113.20882-1-chizhiling@163.com \
    --to=chizhiling@163.com \
    --cc=chizhiling@kylinos.cn \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj1557.seo@samsung.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®