[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170520040943.kf4sy4ssixoz7coo@thunk.org>
Date: Sat, 20 May 2017 00:09:43 -0400
From: Theodore Ts'o <tytso@....edu>
To: Tahsin Erdogan <tahsin@...gle.com>
Cc: Michal Hocko <mhocko@...e.com>, Jan Kara <jack@...e.com>,
linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] jbd2: preserve original nofs flag during journal
restart
On Thu, May 18, 2017 at 09:28:50AM -0700, Tahsin Erdogan wrote:
> When a transaction starts, start_this_handle() saves current
> PF_MEMALLOC_NOFS value so that it can be restored at journal stop time.
> Journal restart is a special case that calls start_this_handle() without
> stopping the transaction. start_this_handle() isn't aware that the
> original value is already stored so it overwrites it with current value.
>
> For instance, a call sequence like below leaves PF_MEMALLOC_NOFS flag set
> at the end:
>
> jbd2_journal_start()
> jbd2__journal_restart()
> jbd2_journal_stop()
>
> Make jbd2__journal_restart() restore the original value before calling
> start_this_handle().
>
> Fixes: 81378da64de6 ("jbd2: mark the transaction context with the scope GFP_NOFS context")
> Signed-off-by: Tahsin Erdogan <tahsin@...gle.com>
> Reviewed-by: Jan Kara <jack@...e.cz>
Thanks, applied.
- Ted
Powered by blists - more mailing lists