From nobody Sat Feb 7 13:41:31 2026 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 C75792E0B71 for ; Fri, 16 Jan 2026 08:56:37 +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=1768553803; cv=none; b=hQTinsb6WqpZyvsSnSvmgXUnRCfFOF2pUFiXkDWebQPISMaw+KNC11XpAouJDQVUg3gDYA2K3+L/7xbYi3Ev1WCWrtaX3kaEbyRnvRLKnA5Lg7BE8NAabN9Eb3EBPPvQTC0e7B0nN3xf2GyN4BSy5YNp9bF3NaKVVDUQZWlKJCU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768553803; c=relaxed/simple; bh=+NSrvHV2SSmOt34FNA1uBu+Z49H6BSnu+ZwmaZA+U0s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=d7tHJkosE3IKYVsxjW5Tqh9BZvITjAkRWVATHkUun2EPfUli6PEB1pvZJ/WYgwknWSKsnjC5keUd7jsQKTM2V3xDO9byXjcT76ytC4HMaxKX7vO9tAbjoiezMU6y/O0SUO11QtYpGm0/W1WOOdHGbyYGn3/uwwJif8D5innqLrc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HTfWov/7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HTfWov/7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA683C2BC87; Fri, 16 Jan 2026 08:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768553797; bh=+NSrvHV2SSmOt34FNA1uBu+Z49H6BSnu+ZwmaZA+U0s=; h=From:To:Cc:Subject:Date:From; b=HTfWov/7OCvStTyIlSkjhgXYTkOp4ZWnD0j1YX38sX/EtbRj7QcGIPvJOmLUoqKX/ x1ywBPeKtQnFI3El9jgSWwSLfG1IcJDBpmFOA6JVEfBNxMiSRsKTlDv5N9qqBiyyPe TyZ86hDc88+DDgf7BBvzXBF5VTe7tLlBursBPVoeJIOrfBfBTIvj5uuNF4VPc6XVKq rYZIe9EGj0SQWcMJr7P+3RDe6wAzZctAuYfRcfW22VkUrHq+BCgtNlIUb4XO71dTfE 7Sjg+WkQ2435aP1kMQeKViP2Kz0eg3VByWlJGVtakVb/E1gh8BcOCD8uZEhBJat7dx chVCKB8cL9lPQ== From: Chao Yu To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu Subject: [PATCH v2] f2fs: fix error path handling in f2fs_read_data_large_folio() Date: Fri, 16 Jan 2026 14:29:27 +0800 Message-Id: <20260116062927.21725-1-chao@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In error path of f2fs_read_data_large_folio(), if bio is valid, it may submit bio twice, fix it. Signed-off-by: Chao Yu --- v2: - rebase the code fs/f2fs/data.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 5b4832956196..d685c889f7b6 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2577,17 +2577,14 @@ static int f2fs_read_data_large_folio(struct inode = *inode, folio_end_read(folio, !ret); return ret; } - +out: + f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA); if (ret) { - f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA); - /* Wait bios and clear uptodate. */ folio_lock(folio); folio_clear_uptodate(folio); folio_unlock(folio); } -out: - f2fs_submit_read_bio(F2FS_I_SB(inode), bio, DATA); return ret; } =20 --=20 2.40.1