summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2019-07-04 04:43:37 +0300
committerJoel Stanley <joel@jms.id.au>2019-07-04 04:43:41 +0300
commit2caf12c9ed84a39b383d0f237d1506b7e9a95bdf (patch)
tree8ba503d4cb7079f73d4b71f306c3e0c120cec53b /fs/io_uring.c
parentd83aec28b086ee676056638d77ac93b06ec3d4b1 (diff)
parent8584aaf1c3262ca17d1e4a614ede9179ef462bb0 (diff)
downloadlinux-dev-5.1.tar.xz
Merge tag 'v5.1.16' into dev-5.1dev-5.1
This is the 5.1.16 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index e82adbf8adc1..b897695c91c0 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -533,6 +533,7 @@ static struct io_kiocb *io_get_req(struct io_ring_ctx *ctx,
state->cur_req++;
}
+ req->file = NULL;
req->ctx = ctx;
req->flags = 0;
/* one is dropped after submission, the other at completion */
@@ -1684,10 +1685,8 @@ static int io_req_set_file(struct io_ring_ctx *ctx, const struct sqe_submit *s,
flags = READ_ONCE(s->sqe->flags);
fd = READ_ONCE(s->sqe->fd);
- if (!io_op_needs_file(s->sqe)) {
- req->file = NULL;
+ if (!io_op_needs_file(s->sqe))
return 0;
- }
if (flags & IOSQE_FIXED_FILE) {
if (unlikely(!ctx->user_files ||