diff mbox series

[06/11] btrfs: remove redundant value assignment at btrfs_add_extent_mapping()

Message ID 2817890ac4b8027e099331b4a5d563f685d4fdcf.1701706418.git.fdmanana@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs: some cleanups and optimizations for extent maps | expand

Commit Message

Filipe Manana Dec. 4, 2023, 4:20 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

At btrfs_add_extent_mapping(), in case add_extent_mapping() returned
-EEXIST, it's pointless to assign 0 to 'ret' since we will assign a value
to it shortly after, without 'ret' being used before that. So remove that
pointless assignment.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_map.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index 18a5c4332ed6..a3d69c943eec 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -586,8 +586,6 @@  int btrfs_add_extent_mapping(struct btrfs_fs_info *fs_info,
 	if (ret == -EEXIST) {
 		struct extent_map *existing;
 
-		ret = 0;
-
 		existing = search_extent_mapping(em_tree, start, len);
 
 		trace_btrfs_handle_em_exist(fs_info, existing, em, start, len);