Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755452AbdCJQ62 (ORCPT ); Fri, 10 Mar 2017 11:58:28 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:47145 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755355AbdCJQ6R (ORCPT ); Fri, 10 Mar 2017 11:58:17 -0500 Message-ID: <1489165082.2593.19.camel@decadent.org.uk> Subject: Re: [PATCH 4.4 49/91] ext4: preserve the needs_recovery flag when the journal is aborted From: Ben Hutchings To: Theodore Tso Cc: stable@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org Date: Fri, 10 Mar 2017 16:58:02 +0000 In-Reply-To: <20170310083903.222968810@linuxfoundation.org> References: <20170310083900.730556986@linuxfoundation.org> <20170310083903.222968810@linuxfoundation.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-2VyrHoM3Qxchi6XIgCcN" X-Mailer: Evolution 3.22.5-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 82.70.136.246 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2485 Lines: 73 --=-2VyrHoM3Qxchi6XIgCcN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2017-03-10 at 10:08 +0100, Greg Kroah-Hartman wrote: > 4.4-stable review patch.=C2=A0=C2=A0If anyone has any objections, please = let me know. >=20 > ------------------ >=20 > From: Theodore Ts'o >=20 > commit 97abd7d4b5d9c48ec15c425485f054e1c15e591b upstream. >=20 > If the journal is aborted, the needs_recovery feature flag should not > be removed.=C2=A0=C2=A0Otherwise, it's the journal might not get replayed= and > this could lead to more data getting lost. >=20 > Signed-off-by: Theodore Ts'o > Signed-off-by: Greg Kroah-Hartman >=20 > --- > =C2=A0fs/ext4/super.c |=C2=A0=C2=A0=C2=A0=C2=A06 ++++-- > =C2=A01 file changed, 4 insertions(+), 2 deletions(-) >=20 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c [...] > @@ -802,9 +803,10 @@ static void ext4_put_super(struct super_ > =C2=A0 destroy_workqueue(sbi->rsv_conversion_wq); > =C2=A0 > =C2=A0 if (sbi->s_journal) { > + aborted =3D is_journal_aborted(sbi->s_journal); > =C2=A0 err =3D jbd2_journal_destroy(sbi->s_journal); > =C2=A0 sbi->s_journal =3D NULL; > - if (err < 0) > + if ((err < 0) && !aborted) > =C2=A0 ext4_abort(sb, "Couldn't clean up the journal"); [...] Shouldn't the aborted flag also be set here when err < 0? Ben. --=20 Ben Hutchings If you seem to know what you are doing, you'll be given more to do. --=-2VyrHoM3Qxchi6XIgCcN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAljC2xoACgkQ57/I7JWG EQl6Gw/+JliZdaoUUNQE/X11Wtstpf5WKprp4vtANwaDCgL4x02MO3alSKaW9hod hmxuRzt8vYQz7E2+B2iu6qcMm23pmbxTgxIXSk3pyB/GzkkkCA7mTe3SEBYD+ZZm FaLO2KjRru2C8nYXJ6InEQX2GNKwBcYZITtohrbfEgnZqaka58SIzpYcc7RlES+C Km6giq5Q/9hvJIqvaxKRPd5DI2ghI+FJ+BC0AKqySYP2Zp/PFWMs2kaxlLNG+fGT 2De5JYiBa266of7KPOSnqYnICK/V/BJ/Pm55WAba5AgdPRYnKnXSAMsTeZiGpUp/ Eyg6xijVNUxUnVj0Yy4yu4flzjuhOidINYI9NZV4XIYeKWwriDDTyS6sCyZbaD8A D5EXnPBHf2ss2viR9/biI0OblbILT2xETm5xPoIK+7azxE9jvVjWr0a3MYzrh73y rVS/cANYZskrHsOl0FddKT47lOtQGTx/E05CPfw6sa5sdZM0N24ryduJP1dKQ7fd +Rk18TGFczxBD6JuqcVJG/p3MaQAIdAI1t7N+Chvuxuw9YKyZw1h2SnowHRcQpsT iw0kWEZPHQQgnidFyvOv0l+sUhxBCaArTQYh7kbZFWipjDOJXS45kJmz5+udpknp nbZb8VdzVbAhQe46kJ1GSsnlWMi7mY54RHDHIWaGn70VCDQ+LJk= =dMrp -----END PGP SIGNATURE----- --=-2VyrHoM3Qxchi6XIgCcN--