Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933850AbdCJUOR (ORCPT ); Fri, 10 Mar 2017 15:14:17 -0500 Received: from imap.thunk.org ([74.207.234.97]:45650 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932764AbdCJUOK (ORCPT ); Fri, 10 Mar 2017 15:14:10 -0500 Date: Fri, 10 Mar 2017 15:14:06 -0500 From: "Theodore Ts'o" To: Ben Hutchings Cc: stable@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4.4 49/91] ext4: preserve the needs_recovery flag when the journal is aborted Message-ID: <20170310201406.n4w3vhmrcr4xmcyt@thunk.org> Mail-Followup-To: Theodore Ts'o , Ben Hutchings , stable@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org References: <20170310083900.730556986@linuxfoundation.org> <20170310083903.222968810@linuxfoundation.org> <1489165082.2593.19.camel@decadent.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1489165082.2593.19.camel@decadent.org.uk> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 862 Lines: 27 On Fri, Mar 10, 2017 at 04:58:02PM +0000, Ben Hutchings wrote: > > --- > > ?fs/ext4/super.c |????6 ++++-- > > ?1 file changed, 4 insertions(+), 2 deletions(-) > > > > --- a/fs/ext4/super.c > > +++ b/fs/ext4/super.c > [...] > > @@ -802,9 +803,10 @@ static void ext4_put_super(struct super_ > > ? destroy_workqueue(sbi->rsv_conversion_wq); > > ? > > ? if (sbi->s_journal) { > > + aborted = is_journal_aborted(sbi->s_journal); > > ? err = jbd2_journal_destroy(sbi->s_journal); > > ? sbi->s_journal = NULL; > > - if (err < 0) > > + if ((err < 0) && !aborted) > > ? ext4_abort(sb, "Couldn't clean up the journal"); > [...] > > Shouldn't the aborted flag also be set here when err < 0? Nice catch. That's a separate issue (the bug was there before this commit), though I'll send a separate patch to fix this in mainline and then cc stable, OK? - Ted