diff options
author | Lukas Bulwahn <[email protected]> | 2021-08-20 14:08:53 +0200 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2021-11-04 10:33:25 -0400 |
commit | afcc4e32f606dbfb47aa7309172c89174b86e74c (patch) | |
tree | 47765718ac2f1993b1eb59917324fe6b4a73d76e | |
parent | 3bbef91bdd2180c67407285ba160b023eb4d5306 (diff) |
ext4: scope ret locally in ext4_try_to_trim_range()
As commit 6920b3913235 ("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]>
-rw-r--r-- | fs/ext4/mballoc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 72bfac2d6dce..215b7068f548 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -6299,7 +6299,6 @@ __releases(ext4_group_lock_ptr(sb, e4b->bd_group)) { ext4_grpblk_t next, count, free_count; void *bitmap; - int ret = 0; bitmap = e4b->bd_bitmap; start = (e4b->bd_info->bb_first_free > start) ? @@ -6314,10 +6313,10 @@ __releases(ext4_group_lock_ptr(sb, e4b->bd_group)) next = mb_find_next_bit(bitmap, max + 1, start); if ((next - start) >= minblocks) { - ret = ext4_trim_extent(sb, start, next - start, e4b); + int ret = ext4_trim_extent(sb, start, next - start, e4b); + if (ret && ret != -EOPNOTSUPP) break; - ret = 0; count += next - start; } free_count += next - start; |