Skip to content

Commit 692495b

Browse files
committed
Merge tag 'io_uring-5.9-2020-09-25' of git://git.kernel.dk/linux-block
Pull io_uring fixes from Jens Axboe: "Two fixes for regressions in this cycle, and one that goes to 5.8 stable: - fix leak of getname() retrieved filename - remove plug->nowait assignment, fixing a regression with btrfs - fix for async buffered retry" * tag 'io_uring-5.9-2020-09-25' of git://git.kernel.dk/linux-block: io_uring: ensure async buffered read-retry is setup properly io_uring: don't unconditionally set plug->nowait = true io_uring: ensure open/openat2 name is cleaned on cancelation
2 parents 9d2fbae + f38c7e3 commit 692495b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fs/io_uring.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,10 +3172,8 @@ static int io_read(struct io_kiocb *req, bool force_nonblock,
31723172
goto done;
31733173
/* some cases will consume bytes even on error returns */
31743174
iov_iter_revert(iter, iov_count - iov_iter_count(iter));
3175-
ret = io_setup_async_rw(req, iovec, inline_vecs, iter, false);
3176-
if (ret)
3177-
goto out_free;
3178-
return -EAGAIN;
3175+
ret = 0;
3176+
goto copy_iov;
31793177
} else if (ret < 0) {
31803178
/* make sure -ERESTARTSYS -> -EINTR is done */
31813179
goto done;
@@ -5671,6 +5669,11 @@ static void __io_clean_op(struct io_kiocb *req)
56715669
io_put_file(req, req->splice.file_in,
56725670
(req->splice.flags & SPLICE_F_FD_IN_FIXED));
56735671
break;
5672+
case IORING_OP_OPENAT:
5673+
case IORING_OP_OPENAT2:
5674+
if (req->open.filename)
5675+
putname(req->open.filename);
5676+
break;
56745677
}
56755678
req->flags &= ~REQ_F_NEED_CLEANUP;
56765679
}
@@ -6348,9 +6351,6 @@ static void io_submit_state_start(struct io_submit_state *state,
63486351
struct io_ring_ctx *ctx, unsigned int max_ios)
63496352
{
63506353
blk_start_plug(&state->plug);
6351-
#ifdef CONFIG_BLOCK
6352-
state->plug.nowait = true;
6353-
#endif
63546354
state->comp.nr = 0;
63556355
INIT_LIST_HEAD(&state->comp.list);
63566356
state->comp.ctx = ctx;

0 commit comments

Comments
 (0)