File tree Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -1586,22 +1586,6 @@ static void __io_submit_flush_completions(struct io_ring_ctx *ctx)
1586
1586
}
1587
1587
}
1588
1588
1589
- /*
1590
- * Drop reference to request, return next in chain (if there is one) if this
1591
- * was the last reference to this request.
1592
- */
1593
- static inline struct io_kiocb * io_put_req_find_next (struct io_kiocb * req )
1594
- {
1595
- struct io_kiocb * nxt = NULL ;
1596
-
1597
- if (req_ref_put_and_test (req )) {
1598
- if (unlikely (req -> flags & IO_REQ_LINK_FLAGS ))
1599
- nxt = io_req_find_next (req );
1600
- io_free_req (req );
1601
- }
1602
- return nxt ;
1603
- }
1604
-
1605
1589
static unsigned io_cqring_events (struct io_ring_ctx * ctx )
1606
1590
{
1607
1591
/* See comment at the top of this file */
@@ -1954,9 +1938,14 @@ int io_poll_issue(struct io_kiocb *req, struct io_tw_state *ts)
1954
1938
struct io_wq_work * io_wq_free_work (struct io_wq_work * work )
1955
1939
{
1956
1940
struct io_kiocb * req = container_of (work , struct io_kiocb , work );
1941
+ struct io_kiocb * nxt = NULL ;
1957
1942
1958
- req = io_put_req_find_next (req );
1959
- return req ? & req -> work : NULL ;
1943
+ if (req_ref_put_and_test (req )) {
1944
+ if (req -> flags & IO_REQ_LINK_FLAGS )
1945
+ nxt = io_req_find_next (req );
1946
+ io_free_req (req );
1947
+ }
1948
+ return nxt ? & nxt -> work : NULL ;
1960
1949
}
1961
1950
1962
1951
void io_wq_submit_work (struct io_wq_work * work )
You can’t perform that action at this time.
0 commit comments