From patchwork Mon Dec 4 16:20:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13478754 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFB392E64E for ; Mon, 4 Dec 2023 16:20:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p46pASB5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0DBFC433CA for ; Mon, 4 Dec 2023 16:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701706843; bh=MGMMOPfmskEocKsVkAeaCnVN0yIHSXR5NKaBqezT04U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p46pASB5ecdKIew2tsZmYRDWQrhV27AnH/pdgGpqmeeosLgcO+m0XzKuZ/xD1JJXH ltfDsKZCm7lyKQ4tLY+pXLnpzzzUFOJM9sBijfJQkhbH9VZRFQG/pgkQQg0sPv5MK7 j3XMrxNO/gXduG/mftrGskNylJjI45FU2o3MkqpbL7f6awn1fGyggWYGXXMIUfvkc7 2t0cEYyBvV+pQI1xTlkQh72YvoUsFW3zR1LBYC1hIxs7PIhWkbwXZj+jGd+Bh60Okc 7dhxagl3PYE7bg3MA7zK6PoXwIegodSXQzpWwzYRR9gnNPjnAhRHtn2XbwTowfSv3/ 4cFZqc27G5vcQ== From: fdmanana@kernel.org To: linux-btrfs@vger.kernel.org Subject: [PATCH 06/11] btrfs: remove redundant value assignment at btrfs_add_extent_mapping() Date: Mon, 4 Dec 2023 16:20:28 +0000 Message-Id: <2817890ac4b8027e099331b4a5d563f685d4fdcf.1701706418.git.fdmanana@suse.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana 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 --- fs/btrfs/extent_map.c | 2 -- 1 file changed, 2 deletions(-) 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);