Commit 6f4c9772 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Greg Kroah-Hartman
Browse files

io_uring: Convert advanced XArray uses to the normal API

commit 5e2ed8c4f45093698855b1f45cdf43efbf6dd498 upstream.

There are no bugs here that I've spotted, it's just easier to use the
normal API and there are no performance advantages to using the more
verbose advanced API.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <>
Signed-off-by: default avatarJens Axboe <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent f7b24bee
......@@ -7958,27 +7958,17 @@ static int io_uring_add_task_file(struct file *file)
static void io_uring_del_task_file(struct file *file)
struct io_uring_task *tctx = current->io_uring;
XA_STATE(xas, &tctx->xa, (unsigned long) file);
if (tctx->last == file)
tctx->last = NULL;
file = xas_store(&xas, NULL);
file = xa_erase(&tctx->xa, (unsigned long)file);
if (file)
static void __io_uring_attempt_task_drop(struct file *file)
XA_STATE(xas, &current->io_uring->xa, (unsigned long) file);
struct file *old;
old = xas_load(&xas);
struct file *old = xa_load(&current->io_uring->xa, (unsigned long)file);
if (old == file)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment