linux-next: manual merge of the block tree with Linus' tree

From: Stephen Rothwell
Date: Sun Apr 02 2023 - 22:36:18 EST


Hi all,

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

io_uring/alloc_cache.h

between commit:

fd30d1cdcc4f ("io_uring: fix poll/netmsg alloc caches")

from Linus' tree and commits:

66eb95a0cf1c ("io_uring: Move from hlist to io_wq_work_node")
16afed16c7a6 ("io_uring: Add KASAN support for alloc_caches")

from the block 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.

--
Cheers,
Stephen Rothwell

diff --cc io_uring/alloc_cache.h
index c2cde88aeed5,3aba7b356320..000000000000
--- a/io_uring/alloc_cache.h
+++ b/io_uring/alloc_cache.h
@@@ -23,12 -25,13 +25,14 @@@ static inline bool io_alloc_cache_put(s

static inline struct io_cache_entry *io_alloc_cache_get(struct io_alloc_cache *cache)
{
- if (!hlist_empty(&cache->list)) {
- struct hlist_node *node = cache->list.first;
+ if (cache->list.next) {
+ struct io_cache_entry *entry;

- hlist_del(node);
+ entry = container_of(cache->list.next, struct io_cache_entry, node);
+ kasan_unpoison_range(entry, cache->elem_size);
+ cache->list.next = cache->list.next->next;
+ cache->nr_cached--;
- return container_of(node, struct io_cache_entry, node);
+ return entry;
}

return NULL;

Attachment: pgpRgiUVr_v4r.pgp
Description: OpenPGP digital signature