Commit bdff777
Andreas Gruenbacher
gfs2: Fix up gfs2_glock_async_wait
Since commit 1fc05c8 ("gfs2: cancel timed-out glock requests"), a
pending locking request can be canceled by calling gfs2_glock_dq() on
the pending holder. In gfs2_glock_async_wait(), when we time out, use
that to cancel the remaining locking requests and dequeue the locking
requests already granted. That's simpler as well as more efficient than
waiting for all locking requests to eventually be granted and dequeuing
them then.
In addition, gfs2_glock_async_wait() promises that by the time the
function completes, all glocks are either granted or dequeued, but the
implementation doesn't keep that promise if individual locking requests
fail. Fix that as well.
Signed-off-by: Andreas Gruenbacher <[email protected]>1 parent 03c765b commit bdff777
1 file changed
+15
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
1358 | | - | |
1359 | 1358 | | |
1360 | 1359 | | |
1361 | 1360 | | |
| |||
1365 | 1364 | | |
1366 | 1365 | | |
1367 | 1366 | | |
1368 | | - | |
1369 | 1367 | | |
1370 | | - | |
| 1368 | + | |
1371 | 1369 | | |
| 1370 | + | |
| 1371 | + | |
1372 | 1372 | | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | 1373 | | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
| 1374 | + | |
1397 | 1375 | | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1404 | 1379 | | |
1405 | 1380 | | |
1406 | | - | |
| 1381 | + | |
1407 | 1382 | | |
1408 | 1383 | | |
1409 | | - | |
1410 | | - | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
1411 | 1388 | | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1415 | 1392 | | |
1416 | 1393 | | |
1417 | 1394 | | |
| |||
0 commit comments