From: Chi Zhiling <chizhiling@163.com>
To: linux-fsdevel@vger.kernel.org, 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: [PATCH v1 2/3] exfat: drop parameter sec for exfat_mirror_bh
Date: Wed, 4 Feb 2026 15:14:34 +0800 [thread overview]
Message-ID: <20260204071435.602246-3-chizhiling@163.com> (raw)
In-Reply-To: <20260204071435.602246-1-chizhiling@163.com>
From: Chi Zhiling <chizhiling@kylinos.cn>
The sector offset can be obtained from bh->b_blocknr, so drop the
parameter and do some cleanups.
No functional changes.
Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
---
fs/exfat/fatent.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/fs/exfat/fatent.c b/fs/exfat/fatent.c
index 0c17621587d5..0bc54aa5d122 100644
--- a/fs/exfat/fatent.c
+++ b/fs/exfat/fatent.c
@@ -11,11 +11,11 @@
#include "exfat_raw.h"
#include "exfat_fs.h"
-static int exfat_mirror_bh(struct super_block *sb, sector_t sec,
- struct buffer_head *bh)
+static int exfat_mirror_bh(struct super_block *sb, struct buffer_head *bh)
{
struct buffer_head *c_bh;
struct exfat_sb_info *sbi = EXFAT_SB(sb);
+ sector_t sec = bh->b_blocknr;
sector_t sec2;
int err = 0;
@@ -25,10 +25,7 @@ static int exfat_mirror_bh(struct super_block *sb, sector_t sec,
if (!c_bh)
return -ENOMEM;
memcpy(c_bh->b_data, bh->b_data, sb->s_blocksize);
- set_buffer_uptodate(c_bh);
- mark_buffer_dirty(c_bh);
- if (sb->s_flags & SB_SYNCHRONOUS)
- err = sync_dirty_buffer(c_bh);
+ exfat_update_bh(c_bh, sb->s_flags & SB_SYNCHRONOUS);
brelse(c_bh);
}
@@ -83,7 +80,7 @@ int exfat_ent_set(struct super_block *sb, unsigned int loc,
fat_entry = (__le32 *)&(bh->b_data[off]);
*fat_entry = cpu_to_le32(content);
exfat_update_bh(bh, sb->s_flags & SB_SYNCHRONOUS);
- exfat_mirror_bh(sb, sec, bh);
+ exfat_mirror_bh(sb, bh);
brelse(bh);
return 0;
}
--
2.43.0
next prev parent reply other threads:[~2026-02-04 7:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 7:14 Chi Zhiling
2026-02-04 7:14 ` [PATCH v1 1/3] exfat: add block readahead in exfat_chain_cont_cluster Chi Zhiling
2026-02-05 1:39 ` Namjae Jeon
2026-02-05 2:13 ` Chi Zhiling
2026-02-04 7:14 ` Chi Zhiling [this message]
2026-02-04 7:14 ` [PATCH v1 3/3] exfat: optimize exfat_chain_cont_cluster with cached buffer heads Chi Zhiling
2026-02-04 7:19 ` 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=20260204071435.602246-3-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®