[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1489165082.2593.19.camel@decadent.org.uk>
Date: Fri, 10 Mar 2017 16:58:02 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: Theodore Tso <tytso@....edu>
Cc: stable@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4.4 49/91] ext4: preserve the needs_recovery flag when
the journal is aborted
On Fri, 2017-03-10 at 10:08 +0100, Greg Kroah-Hartman wrote:
> 4.4-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Theodore Ts'o <tytso@....edu>
>
> commit 97abd7d4b5d9c48ec15c425485f054e1c15e591b upstream.
>
> If the journal is aborted, the needs_recovery feature flag should not
> be removed. Otherwise, it's the journal might not get replayed and
> this could lead to more data getting lost.
>
> Signed-off-by: Theodore Ts'o <tytso@....edu>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>
> ---
> 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?
Ben.
--
Ben Hutchings
If you seem to know what you are doing, you'll be given more to do.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists