Received: by 10.192.165.148 with SMTP id m20csp2529922imm; Sun, 22 Apr 2018 08:58:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx49UDDpZDauYuQoBuDrrvBnkltddXHewnsxL9GRJD5d4vP/phpaSlNeCQw2bMtqOqO0AFZmC X-Received: by 10.99.39.135 with SMTP id n129mr14514469pgn.167.1524412702610; Sun, 22 Apr 2018 08:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524412702; cv=none; d=google.com; s=arc-20160816; b=cKL/DlNCKO66ZfWHJFclCeAdNQS6dg9pfPAPwBtSUH2Ao8KN/yGDXnuyRmXrUbtZqo aHLUZ0am2A3BVAWsSXeOaIG+qzj96YCOpDq0VPr6tlg4dzHKBgv/TUPTEzXiPYDETSIM e9pxS8sdufoWcsKzBcljBDPe51OCC2Sbahl4xGXfMHfyAArLnh3vzUK9lbo8AtrX4gVi Q0/RtwNlF65rFZNj2Lo0FxzCipD0qiDWb4kaCRkOQMB7CciQpOym4b3oQQrzD0tVe/H7 oD+Irdg7e7nm3QVksEkV+tPmRumiFrP/KgV4WqjfFce9GLiQqbAAKnfmBw24Y/wnxXn0 Qtsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=bAYEbdYHNYkitnewWG8HRRVOktfikV8ahWqqku6kpaQ=; b=Ay7e6AmbwuDTMcHkUKxrfDGeXnytVgbAtrFzELCCA+ASNFydFzTDLngbgsEJeg40XL Tra5pS7OO4+DKrAQFP2BEuIeRJwQr2CmsvNRiimMMfrpKWprVqdBMD18tvvPhFXCXHCt 5BRb51ury77QLNn6uaQqS5l3mkugeOItUC1NnATjn0SoABE5axzhSaUDyJLZBNReCtLt 1JIKSOr33xa3IN0Olvl+OczTS5hzgbqP/1Ux7Ff1mzuZ3TtgBve5U2375TywUGz0HmPZ bGjBnlyYZMIJUDbqt4WpvvJ+XQXEUUCAFcfq/ISvUOyWwvKjAIkmq0UgiQ+Tndbjkldp x/cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8-v6si10004586plr.42.2018.04.22.08.58.08; Sun, 22 Apr 2018 08:58:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754647AbeDVP4C (ORCPT + 99 others); Sun, 22 Apr 2018 11:56:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47010 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754390AbeDVN7k (ORCPT ); Sun, 22 Apr 2018 09:59:40 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CCABE941; Sun, 22 Apr 2018 13:59:39 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Theodore Tso Subject: [PATCH 4.16 085/196] ext4: shutdown should not prevent get_write_access Date: Sun, 22 Apr 2018 15:51:45 +0200 Message-Id: <20180422135108.697946198@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Theodore Ts'o commit 576d18ed60f5465110087c5e0eb1010de13e374d upstream. The ext4 forced shutdown flag needs to prevent new handles from being started, but it needs to allow existing handles to complete. So the forced shutdown flag should not force ext4_journal_get_write_access to fail. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/ext4_jbd2.c | 7 ------- 1 file changed, 7 deletions(-) --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -166,13 +166,6 @@ int __ext4_journal_get_write_access(cons might_sleep(); if (ext4_handle_valid(handle)) { - struct super_block *sb; - - sb = handle->h_transaction->t_journal->j_private; - if (unlikely(ext4_forced_shutdown(EXT4_SB(sb)))) { - jbd2_journal_abort_handle(handle); - return -EIO; - } err = jbd2_journal_get_write_access(handle, bh); if (err) ext4_journal_abort_handle(where, line, __func__, bh,