Skip to content

Commit afcc4e3

Browse files
bulwahntytso
authored andcommitted
ext4: scope ret locally in ext4_try_to_trim_range()
As commit 6920b39 ("ext4: add new helper interface ext4_try_to_trim_range()") moves some code into the separate function ext4_try_to_trim_range(), the use of the variable ret within that function is more limited and can be adjusted as well. Scope the use of the variable ret locally and drop dead assignments. No functional change. Signed-off-by: Lukas Bulwahn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 3bbef91 commit afcc4e3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/ext4/mballoc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6299,7 +6299,6 @@ __releases(ext4_group_lock_ptr(sb, e4b->bd_group))
62996299
{
63006300
ext4_grpblk_t next, count, free_count;
63016301
void *bitmap;
6302-
int ret = 0;
63036302

63046303
bitmap = e4b->bd_bitmap;
63056304
start = (e4b->bd_info->bb_first_free > start) ?
@@ -6314,10 +6313,10 @@ __releases(ext4_group_lock_ptr(sb, e4b->bd_group))
63146313
next = mb_find_next_bit(bitmap, max + 1, start);
63156314

63166315
if ((next - start) >= minblocks) {
6317-
ret = ext4_trim_extent(sb, start, next - start, e4b);
6316+
int ret = ext4_trim_extent(sb, start, next - start, e4b);
6317+
63186318
if (ret && ret != -EOPNOTSUPP)
63196319
break;
6320-
ret = 0;
63216320
count += next - start;
63226321
}
63236322
free_count += next - start;

0 commit comments

Comments
 (0)