Commit f44cc26
Kent Overstreet
bcachefs: fix seqmutex_relock()
We were grabbing the sequence number before unlock incremented it - fix
this by moving the increment to seqmutex_lock() (so the seqmutex_relock()
failure path skips the mutex_trylock()), and returning the sequence
number from unlock(), to make the API simpler and safer.
Signed-off-by: Kent Overstreet <[email protected]>1 parent 9bd0150 commit f44cc26
2 files changed
+6
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
579 | 578 | | |
580 | 579 | | |
581 | 580 | | |
| |||
589 | 588 | | |
590 | 589 | | |
591 | 590 | | |
592 | | - | |
593 | | - | |
| 591 | + | |
594 | 592 | | |
595 | 593 | | |
596 | 594 | | |
| |||
811 | 809 | | |
812 | 810 | | |
813 | 811 | | |
814 | | - | |
815 | 812 | | |
816 | 813 | | |
817 | 814 | | |
| |||
828 | 825 | | |
829 | 826 | | |
830 | 827 | | |
831 | | - | |
832 | | - | |
| 828 | + | |
833 | 829 | | |
834 | 830 | | |
835 | 831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 22 | | |
27 | | - | |
28 | 23 | | |
29 | 24 | | |
30 | | - | |
| 25 | + | |
31 | 26 | | |
32 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
| |||
0 commit comments