diff options
author | Bijan Mottahedeh <bijan.mottahedeh@oracle.com> | 2020-04-30 03:47:50 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-05-01 07:24:27 +0300 |
commit | dd461af65946de060bff2dab08a63676d2731afe (patch) | |
tree | 58961aab9d4e7060f29f81b73f2a8c02c8b64091 /fs | |
parent | 490e89676a523c688343d6cb8ca5f5dc476414df (diff) | |
download | linux-dd461af65946de060bff2dab08a63676d2731afe.tar.xz |
io_uring: use proper references for fallback_req locking
Use ctx->fallback_req address for test_and_set_bit_lock() and
clear_bit_unlock().
Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index b536c34c6c36..3da2a02531e6 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1295,7 +1295,7 @@ static struct io_kiocb *io_get_fallback_req(struct io_ring_ctx *ctx) struct io_kiocb *req; req = ctx->fallback_req; - if (!test_and_set_bit_lock(0, (unsigned long *) ctx->fallback_req)) + if (!test_and_set_bit_lock(0, (unsigned long *) &ctx->fallback_req)) return req; return NULL; @@ -1382,7 +1382,7 @@ static void __io_free_req(struct io_kiocb *req) if (likely(!io_is_fallback_req(req))) kmem_cache_free(req_cachep, req); else - clear_bit_unlock(0, (unsigned long *) req->ctx->fallback_req); + clear_bit_unlock(0, (unsigned long *) &req->ctx->fallback_req); } struct req_batch { |