lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211114061515.247865-1-wangborong@cdjrlc.com>
Date:   Sun, 14 Nov 2021 14:15:15 +0800
From:   Jason Wang <wangborong@...rlc.com>
To:     josef@...icpanda.com
Cc:     clm@...com, dsterba@...e.com, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jason Wang <wangborong@...rlc.com>
Subject: [PATCH] btrfs: remove unneeded variable ret

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@...rlc.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ