Re: [PATCH 4.4 49/91] ext4: preserve the needs_recovery flag when the journal is aborted
From: Ben Hutchings
Date: Sat Mar 11 2017 - 00:27:30 EST
On Fri, 2017-03-10 at 15:14 -0500, Theodore Ts'o wrote:
> 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?
Sure, that's not an objection to including this patch in stable now.
Ben.
--
Ben Hutchings
If you seem to know what you are doing, you'll be given more to do.
Attachment:
signature.asc
Description: This is a digitally signed message part