RISCV: config: tizen_visionfive2: Enable USB_DUMMY_HCD as module for usb hcd tetst
[platform/kernel/linux-starfive.git] / io_uring / kbuf.c
index 9a9db1f..acc37e5 100644 (file)
@@ -228,11 +228,14 @@ static int __io_remove_buffers(struct io_ring_ctx *ctx,
                return i;
        }
 
+       /* protects io_buffers_cache */
+       lockdep_assert_held(&ctx->uring_lock);
+
        while (!list_empty(&bl->buf_list)) {
                struct io_buffer *nxt;
 
                nxt = list_first_entry(&bl->buf_list, struct io_buffer, list);
-               list_del(&nxt->list);
+               list_move(&nxt->list, &ctx->io_buffers_cache);
                if (++i == nbufs)
                        return i;
                cond_resched();