Commit dfbe556
committed
io_uring: flush offloaded and delayed task_work on exit
io_uring offloads task_work for cancelation purposes when the task is
exiting. This is conceptually fine, but we should be nicer and actually
wait for that work to complete before returning.
Add an argument to io_fallback_tw() telling it to flush the deferred
work when it's all queued up, and have it flush a ctx behind whenever
the ctx changes.
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 10e1c0d commit dfbe556
1 file changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1237 | 1237 | | |
1238 | 1238 | | |
1239 | 1239 | | |
1240 | | - | |
| 1240 | + | |
1241 | 1241 | | |
1242 | 1242 | | |
| 1243 | + | |
1243 | 1244 | | |
1244 | 1245 | | |
1245 | 1246 | | |
1246 | 1247 | | |
1247 | 1248 | | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1248 | 1257 | | |
1249 | 1258 | | |
1250 | 1259 | | |
1251 | 1260 | | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1252 | 1266 | | |
1253 | 1267 | | |
1254 | 1268 | | |
| |||
1263 | 1277 | | |
1264 | 1278 | | |
1265 | 1279 | | |
1266 | | - | |
| 1280 | + | |
1267 | 1281 | | |
1268 | 1282 | | |
1269 | 1283 | | |
| |||
1358 | 1372 | | |
1359 | 1373 | | |
1360 | 1374 | | |
1361 | | - | |
| 1375 | + | |
1362 | 1376 | | |
1363 | 1377 | | |
1364 | 1378 | | |
| |||
3108 | 3122 | | |
3109 | 3123 | | |
3110 | 3124 | | |
| 3125 | + | |
| 3126 | + | |
3111 | 3127 | | |
3112 | 3128 | | |
3113 | 3129 | | |
| |||
0 commit comments