Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646052

Re: [PATCH v3] jbd2: preserve original nofs flag during journal restart

From Theodore Ts'o <tytso@mit.edu>
Newsgroups linux.kernel
Subject Re: [PATCH v3] jbd2: preserve original nofs flag during journal restart
Date 2017-05-20 06:20 +0200
Message-ID <tJ41X-4n6-1@gated-at.bofh.it> (permalink)
References <tIq4y-8sq-11@gated-at.bofh.it> <tIwtj-5bz-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] jbd2: preserve original nofs flag during journal restart Tahsin Erdogan <tahsin@google.com> - 2017-05-17 14:40 +0200
  Re: [PATCH] jbd2: preserve original nofs flag during journal restart Jan Kara <jack@suse.cz> - 2017-05-17 16:10 +0200
  Re: [PATCH] jbd2: preserve original nofs flag during journal restart Michal Hocko <mhocko@kernel.org> - 2017-05-17 16:20 +0200
    Re: [PATCH] jbd2: preserve original nofs flag during journal restart Jan Kara <jack@suse.cz> - 2017-05-17 17:00 +0200
      Re: [PATCH] jbd2: preserve original nofs flag during journal restart Michal Hocko <mhocko@kernel.org> - 2017-05-17 17:30 +0200
        [PATCH v2] jbd2: preserve original nofs flag during journal restart Tahsin Erdogan <tahsin@google.com> - 2017-05-17 18:20 +0200
          Re: [PATCH v2] jbd2: preserve original nofs flag during journal  restart Michal Hocko <mhocko@kernel.org> - 2017-05-18 11:20 +0200
            Re: [PATCH v2] jbd2: preserve original nofs flag during journal  restart Jan Kara <jack@suse.cz> - 2017-05-18 11:40 +0200
              [PATCH v3] jbd2: preserve original nofs flag during journal restart Tahsin Erdogan <tahsin@google.com> - 2017-05-18 18:30 +0200
                Re: [PATCH v3] jbd2: preserve original nofs flag during journal  restart Theodore Ts'o <tytso@mit.edu> - 2017-05-20 06:20 +0200

csiph-web