Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2402476lqp; Sun, 24 Mar 2024 18:01:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvb9+i/BsvuEjZ9aEX0e4p8LC8ca5GA9YxwpuRzxW9qnz/MpHOXAeoqvXuo0qDxEjBy/dCsAOU2rXLTuIJ4OQr0J/HV3H3SI0iImU8Tw== X-Google-Smtp-Source: AGHT+IGHNHP5QyLXVX6RFXEO0jTzQy7Vp1FUBgC37YTqjRzAc7HSifrY3qJSImipIcxSaPH2Yvez X-Received: by 2002:a05:6a21:32a5:b0:1a3:4e27:c8d1 with SMTP id yt37-20020a056a2132a500b001a34e27c8d1mr7134850pzb.25.1711328506840; Sun, 24 Mar 2024 18:01:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328506; cv=pass; d=google.com; s=arc-20160816; b=AD8c/xcGYh6I+0BUfrBPDia2ignclGvrqa0HXP4k5RbLPSFX0R4FGcwqtvfYI9TzIn aOixAuauXDzSlP0Qq8WpRVQkDqyhPcWWVBibJBX0ykFRRhnF+EfG99YZHI7hs97frO0k 5ViWKDbNiufaQnJKs8R5ZRFxVEMnQmsKMbli+3mFhOIFsd1VElXATTRrhfJa1b30JrYM SPkN6jwYAP3o2MmYj3ljwxZNJRlt5rJ/C/InW6EV8tL0acylyNP63u6jV/srPx0r1Zqi udIUbxz/F0EfnoVoCt0p0dfV/BpbaRlJyCNMvlZgF5eSOJ5XqM4V8qAB2dxJtKHdX2+9 9REQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2z54YBi7kvmWyhojAoh3zWlEsqkLheshs2aP9KRrYcs=; fh=j/x7sSRnXo0LaHT7QL10tuC6FCXce9x5R+7s6GpGj34=; b=rc2DCO7lngiiLfqOPTC3GwFROlGDJUeKbAx2OhkMluNdyE8y6o3RbqS09leMKvmovF bgycXacGfggt9jpW7YNrXFMKmNQSMBUJPNnTY7j3EpyPWTwsbdBncNnWM9dQ8AsJuZC8 AJJKvz+0LlhBLE+gqsZeWEedey14M4kHb/B2lM+YILWG1vXYPeH9UycA1frx5go1pFGn 9cAkXLS162EqQv66sTK8eZzR8ayQrWpn4hG7FDRbRyTECDfZ6HZlXowG6VshDqpis6Jm QLTrXlq/66vvAQdVzPYw6dQDaWcgtb1odQ7RVTj8Wmk1lIAuehgT/GsqQKG2bS9PLRPj oq0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o7D56RiP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b26-20020a630c1a000000b005d4af343858si6605989pgl.361.2024.03.24.18.01.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 18:01:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o7D56RiP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A9E20B24E21 for ; Mon, 25 Mar 2024 00:41:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17BD31AFCEA; Sun, 24 Mar 2024 22:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="o7D56RiP" 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 2D0691AFCC8; Sun, 24 Mar 2024 22:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320256; cv=none; b=GgxzEGiAF/oqXOz5hJ0Vgg92rvyVthxTwxWBAwo3aQXFXf/3uD1ImfjaEry7rsuIiVt19vTjiR1gdwmZKex/G5P7MIjGY4OrxMWOMbnsGtJ00gHGI0SSN4utRnyQlHJtjod5wRissFJQj835aAOoD7q4IQ0QagJHofrSAQsiy/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320256; c=relaxed/simple; bh=rUtiUbwYRLHWShPE8poEYtCKwElA8naS8Pl1LW03mZA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K5+53CQEA3ONa9WfAYjacVhqfXULogHfzybQKD7CfJKcxrTeZBn4gcnlnLbct04IHfR/Pna8Ggh2UL/PHdEOsOsqQzADNlGRy+yr+5BB9JT9456Y8HU83k5pR2IgnIJGj6/NSO7zqZkZRIj5O/lWaJFJl2E9b4l+ccGLH4PTizQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=o7D56RiP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 166F6C43390; Sun, 24 Mar 2024 22:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320255; bh=rUtiUbwYRLHWShPE8poEYtCKwElA8naS8Pl1LW03mZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o7D56RiPXc75DP6LsMQuAdXKK07tv7ssjFPfpc5DcbUl8zjlgkzXF+kFTnO2HnqwS Y+oF9HuOTDu/NO4SCCDVkvFtYxaEhW2IkjXrcwgUoFFJ3OZBBJKZNPiF48Uhm4V8sk gTOQd4o6ey1zQnELJ7XEDFH5W8AphLVqLnaX0SvMMdrwrdWvgdwxJllA9nIofeOQR+ +KRj6e1uCxfddDWYt72jVmbmtgzmBz/xaRDf6xT0iESQu/t+SCAS6BoF4pysVmdskb 3y37dDN0n9/Sf8LK0XNy0/HTUogVW5rYT4FyTsjTIbf8vJCgeRlWrAAN74Kx2O8KVP wemkdK/ityDsA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chao Yu , Daeho Jeong , Jaegeuk Kim , Sasha Levin Subject: [PATCH 6.8 563/715] f2fs: fix to remove unnecessary f2fs_bug_on() to avoid panic Date: Sun, 24 Mar 2024 18:32:22 -0400 Message-ID: <20240324223455.1342824-564-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Chao Yu [ Upstream commit b896e302f79678451a94769ddd9e52e954c64fbb ] verify_blkaddr() will trigger panic once we inject fault into f2fs_is_valid_blkaddr(), fix to remove this unnecessary f2fs_bug_on(). Fixes: 18792e64c86d ("f2fs: support fault injection for f2fs_is_valid_blkaddr()") Reviewed-by: Daeho Jeong Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/f2fs.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 9fd2143378952..e4e249dd4c712 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3470,11 +3470,9 @@ bool f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi, static inline void verify_blkaddr(struct f2fs_sb_info *sbi, block_t blkaddr, int type) { - if (!f2fs_is_valid_blkaddr(sbi, blkaddr, type)) { + if (!f2fs_is_valid_blkaddr(sbi, blkaddr, type)) f2fs_err(sbi, "invalid blkaddr: %u, type: %d, run fsck to fix.", blkaddr, type); - f2fs_bug_on(sbi, 1); - } } static inline bool __is_valid_data_blkaddr(block_t blkaddr) -- 2.43.0