From: Theodore Ts'o <tytso@mit.edu>
To: Tahsin Erdogan <tahsin@google.com>
Cc: Michal Hocko <mhocko@suse.com>, Jan Kara <jack@suse.com>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] jbd2: preserve original nofs flag during journal restart
Date: Sat, 20 May 2017 00:09:43 -0400 [thread overview]
Message-ID: <20170520040943.kf4sy4ssixoz7coo@thunk.org> (raw)
In-Reply-To: <20170518162850.7618-1-tahsin@google.com>
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@google.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
Thanks, applied.
- Ted
prev parent reply other threads:[~2017-05-20 4:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 12:33 [PATCH] jbd2: preserve original nofs flag during journal restart Tahsin Erdogan
2017-05-17 14:04 ` Jan Kara
2017-05-17 14:13 ` Michal Hocko
2017-05-17 14:56 ` Jan Kara
2017-05-17 15:24 ` Michal Hocko
2017-05-17 16:16 ` [PATCH v2] " Tahsin Erdogan
2017-05-18 9:12 ` Michal Hocko
2017-05-18 9:39 ` Jan Kara
2017-05-18 16:28 ` [PATCH v3] " Tahsin Erdogan
2017-05-20 4:09 ` Theodore Ts'o [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170520040943.kf4sy4ssixoz7coo@thunk.org \
--to=tytso@mit.edu \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=tahsin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox