Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Commit

Permalink
io_uring: add missing references
Browse files Browse the repository at this point in the history
  • Loading branch information
Javinator9889 committed Feb 8, 2021
1 parent 61bdfd6 commit 484ebaf
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions fs/io_uring.c
Expand Up @@ -8642,7 +8642,8 @@ static void io_cancel_defer_files(struct io_ring_ctx *ctx,
* Returns true if we found and killed one or more files pinning requests
*/
static bool io_uring_cancel_files(struct io_ring_ctx *ctx,
struct files_struct *files)
struct task_struct *task,
struct files_struct *files)
{
if (list_empty_careful(&ctx->inflight_list))
return false;
Expand Down Expand Up @@ -8696,12 +8697,12 @@ static bool io_cancel_task_cb(struct io_wq_work *work, void *data)
}

static bool __io_uring_cancel_task_requests(struct io_ring_ctx *ctx,
struct task_struct *task,
struct files_struct *files)
struct task_struct *task,
struct files_struct *files)
{
bool ret;

ret = io_uring_cancel_files(ctx, files);
ret = io_uring_cancel_files(ctx, task, files);
if (!files) {
enum io_wq_cancel cret;

Expand Down Expand Up @@ -9354,6 +9355,7 @@ static int io_uring_create(unsigned entries, struct io_uring_params *p,
{
struct user_struct *user = NULL;
struct io_ring_ctx *ctx;
struct file *file;
bool limit_mem;
int ret;

Expand Down Expand Up @@ -9500,6 +9502,14 @@ static int io_uring_create(unsigned entries, struct io_uring_params *p,
goto err;
}

file = io_uring_get_file(ctx);
if (IS_ERR(file))
{
ret = PTR_ERR(file);
goto err;
}


/*
* Install ring fd as the very last thing, so we don't risk someone
* having closed it before we finish setup
Expand Down

0 comments on commit 484ebaf

Please sign in to comment.