2023-11-25 08:13:20

by Kemeng Shi

[permalink] [raw]
Subject: [PATCH 7/8] ext4: remove unused return value of ext4_mb_release_group_pa

Remove unused return value of ext4_mb_release_group_pa.

Signed-off-by: Kemeng Shi <[email protected]>
---
fs/ext4/mballoc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 1ed6d1d5a..e6561a09d 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -5330,7 +5330,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
atomic_add(free, &sbi->s_mb_discarded);
}

-static noinline_for_stack int
+static noinline_for_stack void
ext4_mb_release_group_pa(struct ext4_buddy *e4b,
struct ext4_prealloc_space *pa)
{
@@ -5344,13 +5344,11 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
if (unlikely(group != e4b->bd_group && pa->pa_len != 0)) {
ext4_warning(sb, "bad group: expected %u, group %u, pa_start %llu",
e4b->bd_group, group, pa->pa_pstart);
- return 0;
+ return;
}
mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len);
atomic_add(pa->pa_len, &EXT4_SB(sb)->s_mb_discarded);
trace_ext4_mballoc_discard(sb, NULL, group, bit, pa->pa_len);
-
- return 0;
}

/*
--
2.30.0



2024-01-02 13:07:06

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH 7/8] ext4: remove unused return value of ext4_mb_release_group_pa

On Sun 26-11-23 00:11:42, Kemeng Shi wrote:
> Remove unused return value of ext4_mb_release_group_pa.
>
> Signed-off-by: Kemeng Shi <[email protected]>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <[email protected]>

Honza

> ---
> fs/ext4/mballoc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 1ed6d1d5a..e6561a09d 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -5330,7 +5330,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh,
> atomic_add(free, &sbi->s_mb_discarded);
> }
>
> -static noinline_for_stack int
> +static noinline_for_stack void
> ext4_mb_release_group_pa(struct ext4_buddy *e4b,
> struct ext4_prealloc_space *pa)
> {
> @@ -5344,13 +5344,11 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b,
> if (unlikely(group != e4b->bd_group && pa->pa_len != 0)) {
> ext4_warning(sb, "bad group: expected %u, group %u, pa_start %llu",
> e4b->bd_group, group, pa->pa_pstart);
> - return 0;
> + return;
> }
> mb_free_blocks(pa->pa_inode, e4b, bit, pa->pa_len);
> atomic_add(pa->pa_len, &EXT4_SB(sb)->s_mb_discarded);
> trace_ext4_mballoc_discard(sb, NULL, group, bit, pa->pa_len);
> -
> - return 0;
> }
>
> /*
> --
> 2.30.0
>
>
--
Jan Kara <[email protected]>
SUSE Labs, CR