mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: David Hildenbrand <david@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Carlos Maiolino <cem@kernel.org>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the fs-next tree with the mm tree
Date: Thu, 24 Sep 2026 13:09:09 +0100	[thread overview]
Message-ID: <arUS5b85ed6L01qc@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2796 bytes --]

Hi all,

Today's linux-next merge of the fs-next tree got a conflict in:

  fs/xfs/libxfs/xfs_btree.c

between commit:

  4d1d71f8b90dc ("xfs: remove dead kswapd flag inheritance from btree split worker")

from the mm tree and commit:

  26f42375404e5 ("xfs: fix NOFS state corruption in btree split worker")

from the xfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined fs/xfs/libxfs/xfs_btree.c
index 6738d9d1511bc,7effebe297ea0..0000000000000
--- a/fs/xfs/libxfs/xfs_btree.c
+++ b/fs/xfs/libxfs/xfs_btree.c
@@@ -2994,6 -2994,7 +2994,6 @@@ struct xfs_btree_split_args 
  	struct xfs_btree_cur	**curp;
  	int			*stat;		/* success/failure */
  	int			result;
 -	bool			kswapd;	/* allocation in kswapd context */
  	struct completion	*done;
  	struct work_struct	work;
  };
@@@ -3007,18 -3008,39 +3007,18 @@@ xfs_btree_split_worker
  {
  	struct xfs_btree_split_args	*args = container_of(work,
  						struct xfs_btree_split_args, work);
 -	unsigned long		pflags;
 -	unsigned long		new_pflags = 0;
 -	unsigned int		nofs_flags;
 -
 -	/*
 -	 * we are in a transaction context here, but may also be doing work
 -	 * in kswapd context, and hence we may need to inherit that state
 -	 * temporarily to ensure that we don't block waiting for memory reclaim
 -	 * in any way.
 -	 */
 -	if (args->kswapd)
 -		new_pflags |= PF_MEMALLOC | PF_KSWAPD;
 -
 -	current_set_flags_nested(&pflags, new_pflags);
 -
 -	/*
 -	 * 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();
 +	xfs_trans_set_context(args->cur->bc_tp);
  
  	args->result = __xfs_btree_split(args->cur, args->level, args->ptrp,
  					 args->key, args->curp, args->stat);
  
 -	memalloc_nofs_restore(nofs_flags);
 -	current_restore_flags_nested(&pflags, new_pflags);
 +	xfs_trans_clear_context(args->cur->bc_tp);
  
  	/*
  	 * Do not access args after complete() has run here. We don't own args
  	 * and the owner may run and free args before we return here.
  	 */
  	complete(args->done);
 -
  }
  
  /*
@@@ -3062,7 -3084,7 +3062,7 @@@ xfs_btree_split
  	args.curp = curp;
  	args.stat = stat;
  	args.done = &done;
 -	args.kswapd = current_is_kswapd();
 +
  	INIT_WORK_ONSTACK(&args.work, xfs_btree_split_worker);
  	queue_work(xfs_alloc_wq, &args.work);
  	wait_for_completion(&done);

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-09-24 12:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 12:09 Mark Brown [this message]
  -- 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=arUS5b85ed6L01qc@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cem@kernel.org \
    --cc=david@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rppt@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®