diff options
| author | Jinliang Zheng <alexjlzheng@tencent.com> | 2025-04-29 19:17:22 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2025-07-10 21:33:03 -0400 |
| commit | b6f3801727e47a0ec45ea86fa17ca727f1d4940b (patch) | |
| tree | d476e0622ea3423e0d4aa63ae85697a7861e5083 | |
| parent | d0b3b7b22dfa1f4b515fd3a295b3fd958f9e81af (diff) | |
ext4: remove duplicate check for EXT4_FC_REPLAY
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@tencent.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250429111722.294975-1-alexjlzheng@tencent.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| -rw-r--r-- | fs/ext4/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index be9a4cba35fd5..a798e7c15fb56 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -723,8 +723,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, ext4_check_map_extents_env(inode); /* 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; |
