[5/8] ext4: remove unused return value of ext4_mb_release

Message ID 20231125161143.3945726-6-shikemeng@huaweicloud.com
State New
Headers
Series Some random cleanups to mballoc |

Commit Message

Kemeng Shi Nov. 25, 2023, 4:11 p.m. UTC
  Remove unused return value of ext4_mb_release.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
 fs/ext4/ext4.h    | 2 +-
 fs/ext4/mballoc.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
  

Comments

Jan Kara Jan. 2, 2024, 1:04 p.m. UTC | #1
On Sun 26-11-23 00:11:40, Kemeng Shi wrote:
> Remove unused return value of ext4_mb_release.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/ext4.h    | 2 +-
>  fs/ext4/mballoc.c | 4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 8ccebe0d4..fb35cae16 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -2902,7 +2902,7 @@ extern const struct seq_operations ext4_mb_seq_groups_ops;
>  extern const struct seq_operations ext4_mb_seq_structs_summary_ops;
>  extern int ext4_seq_mb_stats_show(struct seq_file *seq, void *offset);
>  extern int ext4_mb_init(struct super_block *);
> -extern int ext4_mb_release(struct super_block *);
> +extern void ext4_mb_release(struct super_block *);
>  extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *,
>  				struct ext4_allocation_request *, int *);
>  extern void ext4_discard_preallocations(struct inode *, unsigned int);
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index f79e87ad3..8d6246db3 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -3725,7 +3725,7 @@ static int ext4_mb_cleanup_pa(struct ext4_group_info *grp)
>  	return count;
>  }
>  
> -int ext4_mb_release(struct super_block *sb)
> +void ext4_mb_release(struct super_block *sb)
>  {
>  	ext4_group_t ngroups = ext4_get_groups_count(sb);
>  	ext4_group_t i;
> @@ -3801,8 +3801,6 @@ int ext4_mb_release(struct super_block *sb)
>  	}
>  
>  	free_percpu(sbi->s_locality_groups);
> -
> -	return 0;
>  }
>  
>  static inline int ext4_issue_discard(struct super_block *sb,
> -- 
> 2.30.0
> 
>
  

Patch

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 8ccebe0d4..fb35cae16 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2902,7 +2902,7 @@  extern const struct seq_operations ext4_mb_seq_groups_ops;
 extern const struct seq_operations ext4_mb_seq_structs_summary_ops;
 extern int ext4_seq_mb_stats_show(struct seq_file *seq, void *offset);
 extern int ext4_mb_init(struct super_block *);
-extern int ext4_mb_release(struct super_block *);
+extern void ext4_mb_release(struct super_block *);
 extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *,
 				struct ext4_allocation_request *, int *);
 extern void ext4_discard_preallocations(struct inode *, unsigned int);
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index f79e87ad3..8d6246db3 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3725,7 +3725,7 @@  static int ext4_mb_cleanup_pa(struct ext4_group_info *grp)
 	return count;
 }
 
-int ext4_mb_release(struct super_block *sb)
+void ext4_mb_release(struct super_block *sb)
 {
 	ext4_group_t ngroups = ext4_get_groups_count(sb);
 	ext4_group_t i;
@@ -3801,8 +3801,6 @@  int ext4_mb_release(struct super_block *sb)
 	}
 
 	free_percpu(sbi->s_locality_groups);
-
-	return 0;
 }
 
 static inline int ext4_issue_discard(struct super_block *sb,