diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-06-21 13:09:52 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-21 20:46:05 -0600 |
commit | b90cd197f9315f968d5ee4e6ee9f4e3067f2c883 (patch) | |
tree | 8b47935e245c25849f0695d15c0f28239f5c26be /fs | |
parent | 24c74678634b3cbdb325b3b7706366c83811b311 (diff) | |
download | linux-next-b90cd197f9315f968d5ee4e6ee9f4e3067f2c883.tar.gz |
io_uring: set @poll->file after @poll init
It's a good practice to modify fields of a struct after but not before
it was initialised. Even though io_init_poll_iocb() doesn't touch
poll->file, call it first.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 93af915a98e6..cc1f2f3b7bfa 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4596,8 +4596,8 @@ static __poll_t __io_arm_poll_handler(struct io_kiocb *req, struct io_ring_ctx *ctx = req->ctx; bool cancel = false; - poll->file = req->file; io_init_poll_iocb(poll, mask, wake_func); + poll->file = req->file; poll->wait.private = req; ipt->pt._key = mask; |