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.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 4B178C433E1 for ; Sun, 23 Aug 2020 12:25:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B7842078A for ; Sun, 23 Aug 2020 12:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598185508; bh=v7THqtSXhCoF6JJFyEQ7+p1+8MVLBXaYl4UnsQY5Mp8=; h=Subject:To:Cc:From:Date:List-ID:From; b=bPGqY/VYnTATUd3YBS01hKfRncrFquhpFaF5sk8Y/0PF4iy0/O7X5DeX7XZfnElfv QCXygC5rZ3b1vBUuFqDQjDPF775z2/FsgQsLluYqqahucFmg0eFIt8VqsvO07PWJSS Op0QlL1gdJI6MCQOXIRO5XqePAV2rkGYpOXR1KqI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727823AbgHWMZH (ORCPT ); Sun, 23 Aug 2020 08:25:07 -0400 Received: from forward3-smtp.messagingengine.com ([66.111.4.237]:57263 "EHLO forward3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727822AbgHWMZF (ORCPT ); Sun, 23 Aug 2020 08:25:05 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.nyi.internal (Postfix) with ESMTP id 1B19F1940DB8; Sun, 23 Aug 2020 08:25:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 23 Aug 2020 08:25:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=NicfgW kn2smECR3CNAy+dXw9mXVqeS7lgCqDPij6h08=; b=lWY9hjDBfH7X2ftpmfnqu0 5VSeswc9QZbxBBK7XqEk1si99fqpHYLkiZa9XHwwDoKpa2PzVdaNOQ5mQJxzMN6c HHPAORzQqbOsNXDjUliwsLZSWXbm/NUMwKwB0OynJ+5omzFjKwiMEwcIWWoCEbYL /fXKPdZsFhd2dfNe1tJ79//QLwa0qyIBTZLo24l7aX3KsJ571D77vv1Goomla3nN zhyiXJuPt7qWeXNkTTNLyNL49i+MXJaQ85GEpVrW3YGCpOMsZmr251Xi/X8w9cI8 L+DoAMX6U3LnTo7E8DMUjq015JNPt1cDXVmSRcJfgoBQ5mGSNYAkGyuUtK4k+A4g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudduiedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuggftrfgrthhtvghrnhepleelledvgeefleeltdetgedugeffgffhudffudduke egfeelgeeigeekjefhleevnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphep keefrdekiedrkeelrddutdejnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpe hmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 4983E328005A; Sun, 23 Aug 2020 08:25:03 -0400 (EDT) Subject: FAILED: patch "[PATCH] jbd2: add the missing unlock_buffer() in the error path of" failed to apply to 4.4-stable tree To: yi.zhang@huawei.com, riteshh@linux.ibm.com, tytso@mit.edu Cc: From: Date: Sun, 23 Aug 2020 14:25:24 +0200 Message-ID: <15981855242552@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ef3f5830b859604eda8723c26d90ab23edc027a4 Mon Sep 17 00:00:00 2001 From: "zhangyi (F)" Date: Sat, 20 Jun 2020 14:19:48 +0800 Subject: [PATCH] jbd2: add the missing unlock_buffer() in the error path of jbd2_write_superblock() jbd2_write_superblock() is under the buffer lock of journal superblock before ending that superblock write, so add a missing unlock_buffer() in in the error path before submitting buffer. Fixes: 742b06b5628f ("jbd2: check superblock mapped prior to committing") Signed-off-by: zhangyi (F) Reviewed-by: Ritesh Harjani Cc: stable@kernel.org Link: https://lore.kernel.org/r/20200620061948.2049579-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index e4944436e733..5493a0da23dd 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1367,8 +1367,10 @@ static int jbd2_write_superblock(journal_t *journal, int write_flags) int ret; /* Buffer got discarded which means block device got invalidated */ - if (!buffer_mapped(bh)) + if (!buffer_mapped(bh)) { + unlock_buffer(bh); return -EIO; + } trace_jbd2_write_superblock(journal, write_flags); if (!(journal->j_flags & JBD2_BARRIER))