We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8487f08 commit 60a666fCopy full SHA for 60a666f
io_uring/cancel.c
@@ -216,13 +216,10 @@ static int __io_sync_cancel(struct io_uring_task *tctx,
216
/* fixed must be grabbed every time since we drop the uring_lock */
217
if ((cd->flags & IORING_ASYNC_CANCEL_FD) &&
218
(cd->flags & IORING_ASYNC_CANCEL_FD_FIXED)) {
219
- unsigned long file_ptr;
220
-
221
if (unlikely(fd >= ctx->nr_user_files))
222
return -EBADF;
223
fd = array_index_nospec(fd, ctx->nr_user_files);
224
- file_ptr = io_fixed_file_slot(&ctx->file_table, fd)->file_ptr;
225
- cd->file = (struct file *) (file_ptr & FFS_MASK);
+ cd->file = io_file_from_index(&ctx->file_table, fd);
226
if (!cd->file)
227
228
}
0 commit comments