From: Carlos Maiolino <cem@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: David Hildenbrand <david@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Vlastimil Babka <vbabka@kernel.org>,
Andrew Morton <akpm@linux-foundation.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: Re: linux-next: manual merge of the fs-next tree with the mm tree
Date: Fri, 25 Sep 2026 14:26:25 +0200 [thread overview]
Message-ID: <arZn0IB-L3hnNniw@cronus.toxiclabs.cc> (raw)
In-Reply-To: <arUS5b85ed6L01qc@sirena.org.uk>
Hi Mark.
On Thu, Sep 24, 2026 at 01:09:09PM +0100, Mark Brown wrote:
> 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.
Do you mean non-trivial conflicts with linux-next? I always attempt a
merge against Linus's tree before sending a pull-request to check and
annotate any possible conflict, but I have never done that for
linux-next. I can do that, no problems. Where should I send a
notification to? linux-next@vger?
Cheers.
Carlos
>
> 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);
next prev parent reply other threads:[~2026-09-25 12:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 12:09 Mark Brown
2026-09-25 12:26 ` Carlos Maiolino [this message]
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
-- 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=arZn0IB-L3hnNniw@cronus.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=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®