linux-next: manual merge of the mm-nonmm-stable tree with Linus' tree

From: Stephen Rothwell
Date: Wed Jul 10 2024 - 18:48:21 EST


Hi all,

Today's linux-next merge of the mm-nonmm-stable tree got a conflict in:

fs/bcachefs/clock.c

between commit:

a2d23f3d916b ("bcachefs: io clock: run timer fns under clock lock")

from Linus' tree and commit:

1fcce6b8a768 ("bcachefs: remove heap-related macros and switch to generic min_heap")

from the mm-nonmm-stable tree.

I fixed it up (I think - 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.

--
Cheers,
Stephen Rothwell

diff --cc fs/bcachefs/clock.c
index 0f40b585ce2b,18fab9c44b1b..000000000000
--- a/fs/bcachefs/clock.c
+++ b/fs/bcachefs/clock.c
@@@ -131,10 -148,21 +148,17 @@@ static struct io_timer *get_expired_tim
unsigned long now)
{
struct io_timer *ret = NULL;
+ const struct min_heap_callbacks callbacks = {
+ .less = io_timer_cmp,
+ .swp = io_timer_swp,
+ };
+
- spin_lock(&clock->timer_lock);
-
+ if (clock->timers.nr &&
+ time_after_eq(now, clock->timers.data[0]->expire)) {
+ ret = *min_heap_peek(&clock->timers);
+ min_heap_pop(&clock->timers, &callbacks, NULL);
+ }

- if (clock->timers.used &&
- time_after_eq(now, clock->timers.data[0]->expire))
- heap_pop(&clock->timers, ret, io_timer_cmp, NULL);
- spin_unlock(&clock->timer_lock);
-
return ret;
}

Attachment: pgplUqsC31T9p.pgp
Description: OpenPGP digital signature