Commit 0befb85
gfs2: do_promote glock holder stealing fix
In do_promote(), when the glock had no strong holders, we were
accidentally calling demote_incompat_holders() with new_gh == NULL, so
no weak holders were considered incompatible. Instead, the new holder
should have been passed in.
For doing that, the HIF_HOLDER flag needs to be set in new_gh to prevent
may_grant() from complaining. This means that the new holder will now
be recognized as a current holder, so skip over it explicitly in
demote_incompat_holders() to prevent it from being dequeued.
To further clarify things, we can now rename new_gh to current_gh in
demote_incompat_holders(); after all, the HIF_HOLDER flag is already set,
which means the new holder is already a current holder.
Signed-off-by: Bob Peterson <[email protected]>
Signed-off-by: Andreas Gruenbacher <[email protected]>1 parent 8f0028f commit 0befb85
1 file changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
409 | 412 | | |
410 | 413 | | |
411 | | - | |
| 414 | + | |
412 | 415 | | |
413 | 416 | | |
414 | 417 | | |
| |||
424 | 427 | | |
425 | 428 | | |
426 | 429 | | |
| 430 | + | |
| 431 | + | |
427 | 432 | | |
428 | | - | |
| 433 | + | |
429 | 434 | | |
430 | 435 | | |
431 | 436 | | |
| |||
547 | 552 | | |
548 | 553 | | |
549 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
550 | 558 | | |
| 559 | + | |
551 | 560 | | |
552 | 561 | | |
553 | | - | |
554 | 562 | | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | 563 | | |
559 | 564 | | |
560 | 565 | | |
| |||
0 commit comments