mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ocfs2: remove redundant assignment to pointer root_bh
@ 2021-12-28  1:37 Colin Ian King
  2021-12-28  1:49 ` Joseph Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2021-12-28  1:37 UTC (permalink / raw)
  To: Mark Fasheh, Joel Becker, Joseph Qi, ocfs2-devel
  Cc: kernel-janitors, linux-kernel

Pointer root_bh is being initialized with a value that is not read,
it is being re-assigned later on closer to its use. The early
initialization is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/ocfs2/alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index bb247bc349e4..bf9357123bc5 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -2040,7 +2040,7 @@ static void ocfs2_complete_edge_insert(handle_t *handle,
 	int i, idx;
 	struct ocfs2_extent_list *el, *left_el, *right_el;
 	struct ocfs2_extent_rec *left_rec, *right_rec;
-	struct buffer_head *root_bh = left_path->p_node[subtree_index].bh;
+	struct buffer_head *root_bh;
 
 	/*
 	 * Update the counts and position values within all the
-- 
2.33.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ocfs2: remove redundant assignment to pointer root_bh
  2021-12-28  1:37 [PATCH] ocfs2: remove redundant assignment to pointer root_bh Colin Ian King
@ 2021-12-28  1:49 ` Joseph Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi @ 2021-12-28  1:49 UTC (permalink / raw)
  To: Colin Ian King, Mark Fasheh, Joel Becker, ocfs2-devel, akpm
  Cc: kernel-janitors, linux-kernel



On 12/28/21 9:37 AM, Colin Ian King wrote:
> Pointer root_bh is being initialized with a value that is not read,
> it is being re-assigned later on closer to its use. The early
> initialization is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
>  fs/ocfs2/alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
> index bb247bc349e4..bf9357123bc5 100644
> --- a/fs/ocfs2/alloc.c
> +++ b/fs/ocfs2/alloc.c
> @@ -2040,7 +2040,7 @@ static void ocfs2_complete_edge_insert(handle_t *handle,
>  	int i, idx;
>  	struct ocfs2_extent_list *el, *left_el, *right_el;
>  	struct ocfs2_extent_rec *left_rec, *right_rec;
> -	struct buffer_head *root_bh = left_path->p_node[subtree_index].bh;
> +	struct buffer_head *root_bh;
>  
>  	/*
>  	 * Update the counts and position values within all the

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-28  1:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-28  1:37 [PATCH] ocfs2: remove redundant assignment to pointer root_bh Colin Ian King
2021-12-28  1:49 ` Joseph Qi

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®