Medis:wave5: Remove inexistent including
[platform/kernel/linux-starfive.git] / io_uring / rsrc.c
index 185d5df..cce9516 100644 (file)
@@ -562,7 +562,7 @@ static int __io_sqe_buffers_update(struct io_ring_ctx *ctx,
                }
 
                ctx->user_bufs[i] = imu;
-               *io_get_tag_slot(ctx->buf_data, offset) = tag;
+               *io_get_tag_slot(ctx->buf_data, i) = tag;
        }
 
        if (needs_switch)
@@ -779,6 +779,7 @@ void __io_sqe_files_unregister(struct io_ring_ctx *ctx)
        }
 #endif
        io_free_file_tables(&ctx->file_table);
+       io_file_table_set_alloc_range(ctx, 0, 0);
        io_rsrc_data_free(ctx->file_data);
        ctx->file_data = NULL;
        ctx->nr_user_files = 0;