diff options
-rw-r--r-- | fs/io_uring.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index a210a2c0429d..8fc3dd49bc04 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4969,6 +4969,8 @@ static int __io_remove_buffers(struct io_ring_ctx *ctx, kvfree(bl->buf_pages); bl->buf_pages = NULL; bl->buf_nr_pages = 0; + /* make sure it's seen as empty */ + INIT_LIST_HEAD(&bl->buf_list); return i; } @@ -5156,6 +5158,7 @@ static int io_provide_buffers(struct io_kiocb *req, unsigned int issue_flags) ret = -ENOMEM; goto err; } + INIT_LIST_HEAD(&bl->buf_list); ret = io_buffer_add_list(ctx, bl, p->bgid); if (ret) { kfree(bl); |