mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Maiolino <cem@kernel.org>
To: Sasha Levin <sashal@kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
	 Kefeng Wang <wangkefeng.wang@huawei.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 David Hildenbrand <david@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	linux-kernel@vger.kernel.org, linux-next@vger.kernel.org
Subject: Re: linux-next: manual merge of the fs-next tree with the mm tree
Date: Mon, 19 Oct 2026 14:50:58 +0200	[thread overview]
Message-ID: <atYR5sFaEEvBYCdC@nidhogg.toxiclabs.cc> (raw)
In-Reply-To: <20261019114806.1298980-1-sashal@kernel.org>

On Mon, Oct 19, 2026 at 07:48:05AM -0400, Sasha Levin wrote:
> On Mon, Sep 28, 2026 at 01:48:14PM +0100, Mark Brown wrote:
> > There is a fixup in -next already which is hopefully OK, I don't recall
> > it being especially bad so probably Linus would be OK with resolving it.
> 
> Hi Mark,
> 
> The fixup in -next takes the mm side of xfs_btree_split_worker()
> verbatim, which puts xfs_trans_set_context()/xfs_trans_clear_context()
> back and drops
> 
> 23f91a51425e ("xfs: fix NOFS state corruption in btree split worker")
> 
> next-20261016 still has it this way.
> 
> The two changes are independent:
> 
> 2e6a6ca06fec ("xfs: remove dead kswapd flag inheritance from btree split worker")
> 
> removes the pflags handling, and the xfs fix replaces the transaction
> context calls with a local memalloc_nofs_save()/memalloc_nofs_restore().
> The resolution should keep both. The delta against next-20261016 is
> below.
> 
> Neither tree conflicts with v7.3 here on its own, so whichever of the mm
> and xfs pull requests goes second will hit this. Andrew, Carlos, could
> that pull request point Linus at this resolution rather than the one
> earlier in this thread?

Yeah, I heard about this conflict problem on linux-next and how the NOFS
state fix just suddenly got dropped by the conflict resolution.

It's on my TODO list to mention that to Linus on my Pull-Request for the
merge window tomorrow or most late on Wednesday.

> 
> This is the resolution llminus generates:
> 
> diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
> index 6738d9d1511bc..2434c54a35708 100644
> --- a/fs/xfs/libxfs/xfs_btree.c
> +++ b/fs/xfs/libxfs/xfs_btree.c
> @@ -3007,12 +3007,18 @@ xfs_btree_split_worker(
>  {
>  	struct xfs_btree_split_args	*args = container_of(work,
>  						struct xfs_btree_split_args, work);
> -	xfs_trans_set_context(args->cur->bc_tp);
> +	unsigned int		nofs_flags;
> +
> +	/*
> +	 * Don't use xfs_trans_set_context() here: it would overwrite the
> +	 * caller's saved NOFS state in tp->t_pflags. Use a local scope.
> +	 */
> +	nofs_flags = memalloc_nofs_save();
>  
>  	args->result = __xfs_btree_split(args->cur, args->level, args->ptrp,
>  					 args->key, args->curp, args->stat);
>  
> -	xfs_trans_clear_context(args->cur->bc_tp);
> +	memalloc_nofs_restore(nofs_flags);
>  
>  	/*
>  	 * Do not access args after complete() has run here. We don't own args
> 
> -- 
> Thanks,
> Sasha

  reply	other threads:[~2026-10-19 12:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 12:09 Mark Brown
2026-09-25 12:26 ` Carlos Maiolino
2026-09-25 13:11   ` Mark Brown
2026-09-25 15:03     ` Carlos Maiolino
2026-09-25 21:14       ` Andrew Morton
2026-09-28 12:26         ` Kefeng Wang
2026-09-28 12:48           ` Mark Brown
2026-10-19 11:48             ` Sasha Levin
2026-10-19 12:50               ` Carlos Maiolino [this message]
2026-10-19 13:00               ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2026-09-23 10:08 Mark Brown
2026-09-17 14:48 Mark Brown
2026-09-17 14:48 Mark Brown
2026-09-17 14:48 Mark Brown
2026-09-17 19:13 ` Andrew Morton
2026-09-17 21:22   ` Jaegeuk Kim

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=atYR5sFaEEvBYCdC@nidhogg.toxiclabs.cc \
    --to=cem@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=david@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rppt@kernel.org \
    --cc=sashal@kernel.org \
    --cc=vbabka@kernel.org \
    --cc=wangkefeng.wang@huawei.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

all inboxes | Powered by JetHome®