All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] io_uring: use proper references for fallback_req locking
@ 2020-04-30  0:47 Bijan Mottahedeh
  2020-04-30 14:52 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Bijan Mottahedeh @ 2020-04-30  0:47 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

Use ctx->fallback_req address for test_and_set_bit_lock() and
clear_bit_unlock().

Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
---
 fs/io_uring.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 54b7c48..8d23dc6 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1290,7 +1290,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;
@@ -1377,7 +1377,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 {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-04 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30  0:47 [PATCH 1/1] io_uring: use proper references for fallback_req locking Bijan Mottahedeh
2020-04-30 14:52 ` Jens Axboe
2020-05-03 12:52   ` Pavel Begunkov
2020-05-04 16:12     ` Jens Axboe
2020-05-04 16:28       ` Pavel Begunkov
2020-05-04 19:16       ` Bijan Mottahedeh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.