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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 EE98DC35640 for ; Fri, 21 Feb 2020 08:23:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B7BE42469D for ; Fri, 21 Feb 2020 08:23:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273423; bh=0ZJYfqNzHv3LydeOsQNnlwZHAyax/NW+xd+I/G0th9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MFPxA22cUmE2F/yg9z651CriFfFO7T+/OFODwlLRZbxev8wwUaYo2zbI2kZFB+UY5 124a36ter6owFqX+TP2TPyNaWKt6AWaOSicGtVyV1wEnxZE2BPlnr/ZrM95Xy+mfaR 7a9NKjQzuWCGupL7C072KpnNeBAQxBwtufG030M4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388532AbgBUIXm (ORCPT ); Fri, 21 Feb 2020 03:23:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:35762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388490AbgBUIXj (ORCPT ); Fri, 21 Feb 2020 03:23:39 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 312EF206ED; Fri, 21 Feb 2020 08:23:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273418; bh=0ZJYfqNzHv3LydeOsQNnlwZHAyax/NW+xd+I/G0th9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ksYzoeMxrcNTtLhnK5/G6KH3vrH9olJ4zKgtgM7JXAKafQFxHllPEq5g51S4S+oLv nhGoVXEd37VdsXdoxbKY+fPv7JhXX+nqD4NhPDV1NV7CKSe5VoBKqVVLwrQNpf+eS7 1U9hAf1Xu3+TQ/pNkKTZqkL5D3vdgjkrg34SL0Q0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "zhangyi (F)" , Jan Kara , Theodore Tso , Sasha Levin Subject: [PATCH 4.19 162/191] jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record Date: Fri, 21 Feb 2020 08:42:15 +0100 Message-Id: <20200221072310.237393143@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 c321fa06081ce..4200a6fe9599c 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -781,7 +781,7 @@ start_journal_io: 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 @@ start_journal_io: 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