Commit d47b822
dlm: warn about invalid nodeid comparsions
This patch adds a warn on if is_master() and dlm_is_removed() checks on
invalid nodeid states that are probably not what the caller wants to do
here. The is_master() function checking on r->res_nodeid is invalid when
it is set to -1, whereas the dlm_is_removed() has a different meaning
as "nodeid member" and also 0 is invalid.
We run into these cases and this patch changes those cases as we never
will run into them. There should be no functional changes as the
condition should return the same result. However this patch signals now
on caller level that there might be an "extra" case to handle here.
Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: David Teigland <[email protected]>1 parent 90ad918 commit d47b822
4 files changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | | - | |
| 1154 | + | |
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
| |||
5283 | 5283 | | |
5284 | 5284 | | |
5285 | 5285 | | |
5286 | | - | |
| 5286 | + | |
5287 | 5287 | | |
5288 | 5288 | | |
5289 | 5289 | | |
| |||
5396 | 5396 | | |
5397 | 5397 | | |
5398 | 5398 | | |
5399 | | - | |
| 5399 | + | |
5400 | 5400 | | |
5401 | 5401 | | |
5402 | 5402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
369 | 371 | | |
370 | 372 | | |
371 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
| 455 | + | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| |||
664 | 665 | | |
665 | 666 | | |
666 | 667 | | |
667 | | - | |
| 668 | + | |
668 | 669 | | |
669 | 670 | | |
670 | 671 | | |
| |||
858 | 859 | | |
859 | 860 | | |
860 | 861 | | |
861 | | - | |
| 862 | + | |
862 | 863 | | |
863 | 864 | | |
864 | 865 | | |
| |||
0 commit comments