projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89b5066
)
io_uring: better ref handling in poll_remove_one
author
Pavel Begunkov
<asml.silence@gmail.com>
Thu, 1 Apr 2021 14:43:51 +0000
(15:43 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 12 Apr 2021 01:30:34 +0000
(19:30 -0600)
Instead of io_put_req() to drop not a final ref, use req_ref_put(),
which is slimmer and will also check the invariant.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/85b5774ce13ae55cc2e705abdc8cbafe1212f1bd.1617287883.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index edb5b9d0fd1a8d746deb4aa0462757933d871ad7..e92de7e206c07f939843981d10ee1a4b40c771a5 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-5244,7
+5244,7
@@
static bool io_poll_remove_waitqs(struct io_kiocb *req)
/* non-poll requests have submit ref still */
do_complete = __io_poll_remove_one(req, &apoll->poll, true);
if (do_complete) {
-
io_put_req
(req);
+
req_ref_put
(req);
kfree(apoll->double_poll);
kfree(apoll);
}