Commit 4d55f23
committed
io_uring: don't recycle provided buffer if punted to async worker
We only really need to recycle the buffer when going async for a file
type that has an indefinite reponse time (eg non-file/bdev). And for
files that to arm poll, the async worker will arm poll anyway and the
buffer will get recycled there.
In that latter case, we're not holding ctx->uring_lock. Ensure we take
the issue_flags into account and acquire it if we need to.
Fixes: b1c6264 ("io_uring: recycle provided buffers if request goes async")
Reported-by: Stefan Roesch <shr@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent d89a4fa commit 4d55f23
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1383 | 1383 | | |
1384 | 1384 | | |
1385 | 1385 | | |
1386 | | - | |
| 1386 | + | |
1387 | 1387 | | |
1388 | 1388 | | |
1389 | 1389 | | |
| |||
1392 | 1392 | | |
1393 | 1393 | | |
1394 | 1394 | | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
1395 | 1398 | | |
1396 | 1399 | | |
1397 | 1400 | | |
1398 | 1401 | | |
1399 | 1402 | | |
1400 | 1403 | | |
1401 | 1404 | | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
1402 | 1408 | | |
1403 | 1409 | | |
1404 | 1410 | | |
| |||
6254 | 6260 | | |
6255 | 6261 | | |
6256 | 6262 | | |
6257 | | - | |
| 6263 | + | |
6258 | 6264 | | |
6259 | 6265 | | |
6260 | 6266 | | |
| |||
7504 | 7510 | | |
7505 | 7511 | | |
7506 | 7512 | | |
7507 | | - | |
7508 | 7513 | | |
7509 | 7514 | | |
7510 | 7515 | | |
| |||
0 commit comments