* [PATCH] ext4: remove unnecessary duplicate check in ext4_map_blocks()
@ 2025-05-23 16:08 Dan Carpenter
2025-05-24 4:37 ` Ritesh Harjani
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-05-23 16:08 UTC (permalink / raw)
To: Ritesh Harjani
Cc: Theodore Ts'o, Andreas Dilger, linux-ext4, linux-kernel,
kernel-janitors
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>
---
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 be9a4cba35fd..014021019b22 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -757,8 +757,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
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: remove unnecessary duplicate check in ext4_map_blocks()
2025-05-23 16:08 [PATCH] ext4: remove unnecessary duplicate check in ext4_map_blocks() Dan Carpenter
@ 2025-05-24 4:37 ` Ritesh Harjani
0 siblings, 0 replies; 2+ messages in thread
From: Ritesh Harjani @ 2025-05-24 4:37 UTC (permalink / raw)
To: Dan Carpenter
Cc: Theodore Ts'o, Andreas Dilger, linux-ext4, linux-kernel,
kernel-janitors
Dan Carpenter <dan.carpenter@linaro.org> writes:
> The previous lines ensure that EXT4_GET_BLOCKS_QUERY_LAST_IN_LEAF is
> set so remove this duplicate check.
>
Earlier, I knew it was a redundant check, but I went ahead with it
anyway; and later, I might have missed removing it. I agree that we
don’t really need this extra check.
So, the patch looks good to me. Thanks for taking care of it!
Please feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> 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 be9a4cba35fd..014021019b22 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -757,8 +757,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
> --
> 2.47.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-24 4:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 16:08 [PATCH] ext4: remove unnecessary duplicate check in ext4_map_blocks() Dan Carpenter
2025-05-24 4:37 ` Ritesh Harjani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).