From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06869C2BA83 for ; Fri, 14 Feb 2020 16:16:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6BD324654 for ; Fri, 14 Feb 2020 16:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581696982; bh=SiFgmLsWC+GVvtrufp79tdOr8W/hicsAcz6/OWW1t/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BMwE/0HZNWsPxetPOOKyHQHd1FBqXBV9r6l/8jYWiz1WKBTqLUMN6QnBCMsGb4Ok5 IynoQhwed87C8pp252xlkqmkittS5aZ1KT+Z/MHY6MbjAUUHsXkj9PG+I3e41Frcbk iiCu3bQa0SPe3jdMSFjnHD7GnOh48nt48Kop3eQA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392566AbgBNQQV (ORCPT ); Fri, 14 Feb 2020 11:16:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:47092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388586AbgBNQQU (ORCPT ); Fri, 14 Feb 2020 11:16:20 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB44724681; Fri, 14 Feb 2020 16:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581696979; bh=SiFgmLsWC+GVvtrufp79tdOr8W/hicsAcz6/OWW1t/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dd9GJveG1ECYjJHludCWhtKSBuNLmT51QXjenu3SIDpJqoYh1Cq0fhfuExgbjXP4P LEdvlLDKvn8OSo+aXpFVUVHIC733YNhmRi1iX12HJt0Gh3GFWHDiLBcdrWCdXdX5U8 pCOzxawxj0OZ4IlvOdNZop9Lcb2hyBjx8HT/RdUE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "zhangyi (F)" , Jan Kara , Theodore Ts'o , Sasha Levin , linux-ext4@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 216/252] jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record Date: Fri, 14 Feb 2020 11:11:11 -0500 Message-Id: <20200214161147.15842-216-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214161147.15842-1-sashal@kernel.org> References: <20200214161147.15842-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: "zhangyi (F)" [ Upstream commit d0a186e0d3e7ac05cc77da7c157dae5aa59f95d9 ] We invoke jbd2_journal_abort() to abort the journal and record errno in the jbd2 superblock when committing journal transaction besides the failure on submitting the commit record. But there is no need for the case and we can also invoke jbd2_journal_abort() instead of __jbd2_journal_abort_hard(). Fixes: 818d276ceb83a ("ext4: Add the journal checksum feature") Signed-off-by: zhangyi (F) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20191204124614.45424-2-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- fs/jbd2/commit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 020bd7a0d8e03..d4e6288b4bb46 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -781,7 +781,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) err = journal_submit_commit_record(journal, commit_transaction, &cbh, crc32_sum); if (err) - __jbd2_journal_abort_hard(journal); + jbd2_journal_abort(journal, err); } blk_finish_plug(&plug); @@ -874,7 +874,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) err = journal_submit_commit_record(journal, commit_transaction, &cbh, crc32_sum); if (err) - __jbd2_journal_abort_hard(journal); + jbd2_journal_abort(journal, err); } if (cbh) err = journal_wait_on_commit_record(journal, cbh); -- 2.20.1