[PATCH] btrfs: remove unneeded variable ret

From: Jason Wang
Date: Sun Nov 14 2021 - 01:15:51 EST


The variable `ret' used for returning status in function
`unpin_extent_cache' is never changed. we can return 0
and remove the `ret' variable.

Signed-off-by: Jason Wang <wangborong@xxxxxxxxxx>
---
fs/btrfs/extent_map.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 5a36add21305..ac432bed6052 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -296,7 +296,6 @@ static void try_merge_map(struct extent_map_tree *tree, struct extent_map *em)
int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len,
u64 gen)
{
- int ret = 0;
struct extent_map *em;
bool prealloc = false;

@@ -328,8 +327,8 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len,
free_extent_map(em);
out:
write_unlock(&tree->lock);
- return ret;

+ return 0;
}

void clear_em_logging(struct extent_map_tree *tree, struct extent_map *em)
--
2.33.0