linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: ialloc: Remove variables defined more than once in a function
@ 2023-02-07 23:36 Li kunyu
  2023-02-16 12:56 ` Ritesh Harjani
  0 siblings, 1 reply; 2+ messages in thread
From: Li kunyu @ 2023-02-07 23:36 UTC (permalink / raw)
  To: tytso, adilger.kernel; +Cc: linux-ext4, linux-kernel, Li kunyu

The grp pointer variable has been defined at the beginning of the
function. It is not necessary to define it here, so remove the variable
definition here.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 fs/ext4/ialloc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 63f9bb6e8851..be9f742f9415 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -1181,7 +1181,6 @@ struct inode *__ext4_new_inode(struct user_namespace *mnt_userns,
 	/* Update the relevant bg descriptor fields */
 	if (ext4_has_group_desc_csum(sb)) {
 		int free;
-		struct ext4_group_info *grp = NULL;
 
 		if (!(sbi->s_mount_state & EXT4_FC_REPLAY)) {
 			grp = ext4_get_group_info(sb, group);
-- 
2.18.2


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

* Re: [PATCH] ext4: ialloc: Remove variables defined more than once in a function
  2023-02-07 23:36 [PATCH] ext4: ialloc: Remove variables defined more than once in a function Li kunyu
@ 2023-02-16 12:56 ` Ritesh Harjani
  0 siblings, 0 replies; 2+ messages in thread
From: Ritesh Harjani @ 2023-02-16 12:56 UTC (permalink / raw)
  To: Li kunyu, tytso, adilger.kernel; +Cc: linux-ext4, linux-kernel, Li kunyu

Li kunyu <kunyu@nfschina.com> writes:

> The grp pointer variable has been defined at the beginning of the
> function. It is not necessary to define it here, so remove the variable
> definition here.
>
> Signed-off-by: Li kunyu <kunyu@nfschina.com>
> ---
>  fs/ext4/ialloc.c | 1 -
>  1 file changed, 1 deletion(-)

Looks good to me. Please feel free to add -

Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

>
> diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> index 63f9bb6e8851..be9f742f9415 100644
> --- a/fs/ext4/ialloc.c
> +++ b/fs/ext4/ialloc.c
> @@ -1181,7 +1181,6 @@ struct inode *__ext4_new_inode(struct user_namespace *mnt_userns,
>  	/* Update the relevant bg descriptor fields */
>  	if (ext4_has_group_desc_csum(sb)) {
>  		int free;
> -		struct ext4_group_info *grp = NULL;
>
>  		if (!(sbi->s_mount_state & EXT4_FC_REPLAY)) {
>  			grp = ext4_get_group_info(sb, group);
> --
> 2.18.2

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

end of thread, other threads:[~2023-02-16 12:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-07 23:36 [PATCH] ext4: ialloc: Remove variables defined more than once in a function Li kunyu
2023-02-16 12:56 ` 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).