diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-04-12 02:05:01 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-04-12 08:46:30 -0600 |
commit | dccc587f6c07ccc734588226fdf62f685558e89f (patch) | |
tree | 4bc1526e17704f4272b68097c54c905e46fc8845 /fs/io_uring.c | |
parent | 5b8b9d0c6d0e0f1993c6c56deaf9646942c49d94 (diff) | |
download | lwn-dccc587f6c07ccc734588226fdf62f685558e89f.tar.gz lwn-dccc587f6c07ccc734588226fdf62f685558e89f.zip |
io_uring: remove obsolete @mm_fault
If io_submit_sqes() can't grab an mm, it fails and exits right away.
There is no need to track the fact of the failure. Remove @mm_fault.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 5190bfb6a665..81532479c857 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5818,7 +5818,6 @@ static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr, struct io_submit_state state, *statep = NULL; struct io_kiocb *link = NULL; int i, submitted = 0; - bool mm_fault = false; /* if we have a backlog and couldn't flush it all, return BUSY */ if (test_bit(0, &ctx->sq_check_overflow)) { @@ -5872,8 +5871,7 @@ fail_req: } if (io_op_defs[req->opcode].needs_mm && !*mm) { - mm_fault = mm_fault || !mmget_not_zero(ctx->sqo_mm); - if (unlikely(mm_fault)) { + if (unlikely(!mmget_not_zero(ctx->sqo_mm))) { err = -EFAULT; goto fail_req; } |