[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250429111722.294975-1-alexjlzheng@tencent.com>
Date: Tue, 29 Apr 2025 19:17:22 +0800
From: alexjlzheng@...il.com
To: tytso@....edu,
adilger.kernel@...ger.ca,
yi.zhang@...wei.com
Cc: linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jinliang Zheng <alexjlzheng@...cent.com>
Subject: [RESEND PATCH] ext4: remove duplicate check for EXT4_FC_REPLAY
From: Jinliang Zheng <alexjlzheng@...cent.com>
EXT4_FC_REPLAY will be checked in ext4_es_lookup_extent(). If it is
set, ext4_es_lookup_extent() will return 0.
Remove the repeated check for EXT4_FC_REPLAY in ext4_map_blocks()
to simplify the code.
Signed-off-by: Jinliang Zheng <alexjlzheng@...cent.com>
Reviewed-by: Zhang Yi <yi.zhang@...wei.com>
---
Just resend, and the first send email is:
- https://lore.kernel.org/linux-ext4/20241113044158.1609384-1-alexjlzheng@tencent.com/
---
fs/ext4/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 94c7d2d828a6..c87dd4ed39f0 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -623,8 +623,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
return -EFSCORRUPTED;
/* Lookup extent status tree firstly */
- if (!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) &&
- ext4_es_lookup_extent(inode, map->m_lblk, NULL, &es)) {
+ if (ext4_es_lookup_extent(inode, map->m_lblk, NULL, &es)) {
if (ext4_es_is_written(&es) || ext4_es_is_unwritten(&es)) {
map->m_pblk = ext4_es_pblock(&es) +
map->m_lblk - es.es_lblk;
--
2.49.0
Powered by blists - more mailing lists