Skip to content

Commit d73eff6

Browse files
Guoqing Jiangtytso
authored andcommitted
ext4: make ext4_mb_initialize_context return void
Change the return type to void since it always return 0, and no need to do the checking in ext4_mb_new_blocks. Signed-off-by: Guoqing Jiang <[email protected]> Reviewed-by: Ojaswin Mujoo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent a44e84a commit d73eff6

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

fs/ext4/mballoc.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5204,7 +5204,7 @@ static void ext4_mb_group_or_file(struct ext4_allocation_context *ac)
52045204
mutex_lock(&ac->ac_lg->lg_mutex);
52055205
}
52065206

5207-
static noinline_for_stack int
5207+
static noinline_for_stack void
52085208
ext4_mb_initialize_context(struct ext4_allocation_context *ac,
52095209
struct ext4_allocation_request *ar)
52105210
{
@@ -5253,8 +5253,6 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac,
52535253
(unsigned) ar->lleft, (unsigned) ar->pleft,
52545254
(unsigned) ar->lright, (unsigned) ar->pright,
52555255
inode_is_open_for_write(ar->inode) ? "" : "non-");
5256-
return 0;
5257-
52585256
}
52595257

52605258
static noinline_for_stack void
@@ -5591,11 +5589,7 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle,
55915589
goto out;
55925590
}
55935591

5594-
*errp = ext4_mb_initialize_context(ac, ar);
5595-
if (*errp) {
5596-
ar->len = 0;
5597-
goto out;
5598-
}
5592+
ext4_mb_initialize_context(ac, ar);
55995593

56005594
ac->ac_op = EXT4_MB_HISTORY_PREALLOC;
56015595
seq = this_cpu_read(discard_pa_seq);

0 commit comments

Comments
 (0)