The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Chi Zhiling <chizhiling@163.com>
To: exfat@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Namjae Jeon <linkinjeon@kernel.org>,
	Sungjong Seo <sj1557.seo@samsung.com>,
	Yuezhang Mo <yuezhang.mo@sony.com>,
	Chi Zhiling <chizhiling@kylinos.cn>
Subject: [RFC PATCH v1 1/6] exfat: remove dead hint_bmap updates in I/O and truncate paths
Date: Fri, 21 Aug 2026 18:05:26 +0800	[thread overview]
Message-ID: <20260821100531.998196-2-chizhiling@163.com> (raw)
In-Reply-To: <20260821100531.998196-1-chizhiling@163.com>

From: Chi Zhiling <chizhiling@kylinos.cn>

hint_bmap is only consumed by exfat_readdir() during directory
iteration. exfat_map_cluster() runs on the file I/O path (via iomap)
and never reaches directory iteration, and __exfat_truncate() only
resets the hint when the inode is already being evicted, so drop
them along with the now-unused local_clu_offset.

Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
---
 fs/exfat/file.c  | 4 ----
 fs/exfat/inode.c | 5 -----
 2 files changed, 9 deletions(-)

diff --git a/fs/exfat/file.c b/fs/exfat/file.c
index a2a9ee1a2004..29c5db12288e 100644
--- a/fs/exfat/file.c
+++ b/fs/exfat/file.c
@@ -278,10 +278,6 @@ int __exfat_truncate(struct inode *inode)
 	/* clear exfat cache */
 	exfat_cache_inval_inode(inode);
 
-	/* hint information */
-	ei->hint_bmap.off = EXFAT_EOF_CLUSTER;
-	ei->hint_bmap.clu = EXFAT_EOF_CLUSTER;
-
 	/* hint_stat will be used if this is directory. */
 	ei->hint_stat.eidx = 0;
 	ei->hint_stat.clu = ei->start_clu;
diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c
index ccd13630187e..d041f893b1c3 100644
--- a/fs/exfat/inode.c
+++ b/fs/exfat/inode.c
@@ -144,7 +144,6 @@ int exfat_map_cluster(struct inode *inode, unsigned int clu_offset,
 	struct super_block *sb = inode->i_sb;
 	struct exfat_sb_info *sbi = EXFAT_SB(sb);
 	struct exfat_inode_info *ei = EXFAT_I(inode);
-	unsigned int local_clu_offset = clu_offset;
 	unsigned int num_to_be_allocated = 0, num_clusters;
 
 	num_clusters = exfat_bytes_to_cluster(sbi, exfat_ondisk_size(inode));
@@ -234,10 +233,6 @@ int exfat_map_cluster(struct inode *inode, unsigned int clu_offset,
 			*balloc = true;
 	}
 
-	/* hint information */
-	ei->hint_bmap.off = local_clu_offset;
-	ei->hint_bmap.clu = *clu;
-
 	return 0;
 }
 
-- 
2.53.0


  reply	other threads:[~2026-08-21 10:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 10:05 [RFC PATCH 0/6] exfat: take s_lock in read mode for iomap mapping paths Chi Zhiling
2026-08-21 10:05 ` Chi Zhiling [this message]
2026-08-21 10:05 ` [RFC PATCH v1 2/6] exfat: take bitmap_lock at the start of exfat_alloc_cluster() Chi Zhiling
2026-08-21 10:05 ` [RFC PATCH v1 3/6] exfat: use atomic bit ops for volume dirty flag Chi Zhiling
2026-08-21 10:05 ` [RFC PATCH v1 4/6] exfat: lock FAT2 buffer while copying mirrored FAT entries Chi Zhiling
2026-08-21 10:05 ` [RFC PATCH v1 5/6] exfat: convert s_lock mutex to rw_semaphore using write lock Chi Zhiling
2026-08-21 10:05 ` [RFC PATCH v1 6/6] exfat: take s_lock in read mode for iomap mapping paths 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=20260821100531.998196-2-chizhiling@163.com \
    --to=chizhiling@163.com \
    --cc=chizhiling@kylinos.cn \
    --cc=exfat@lists.linux.dev \
    --cc=linkinjeon@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