ext4: remove unnecessary duplicate check in ext4_map_blocks()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 23 May 2025 16:08:45 +0000 (19:08 +0300)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 11 Jul 2025 20:52:59 +0000 (16:52 -0400)
The previous lines ensure that EXT4_GET_BLOCKS_QUERY_LAST_IN_LEAF is
set so remove this duplicate check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://patch.msgid.link/aDCdjUhpzxB64vkD@stanley.mountain
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c

index a798e7c15fb5651b798aebb879d4f1f2a1a614e4..35e7f34ee18890fad6f93c7551a57fa7a611b7b9 100644 (file)
@@ -756,8 +756,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
                                orig_mlen == map->m_len)
                        goto found;
 
-               if (flags & EXT4_GET_BLOCKS_QUERY_LAST_IN_LEAF)
-                       map->m_len = orig_mlen;
+               map->m_len = orig_mlen;
        }
        /*
         * In the query cache no-wait mode, nothing we can do more if we