Skip to content

Commit f0d1dac

Browse files
mrc0mmandbluca
authored andcommitted
home: move the assert back to the intended place
98d81cf moved the assertion at the beginning of home_dispatch_acquire(), which is however before we even check for any ongoing operation, hence we might hit it even in legitimate cases. Let's move it back to after we check for any possibly ongoing operation, to make it once again a safety check. Follow-up to 98d81cf. Resolves: #22443 and #24036 (cherry picked from commit e4ab2db) (cherry picked from commit 23b7bf3) (cherry picked from commit 6e55a4d)
1 parent 3840485 commit f0d1dac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/home/homed-home.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,8 +2694,6 @@ static int home_dispatch_acquire(Home *h, Operation *o) {
26942694
assert(o);
26952695
assert(o->type == OPERATION_ACQUIRE);
26962696

2697-
assert(!h->current_operation);
2698-
26992697
switch (home_get_state(h)) {
27002698

27012699
case HOME_UNFIXATED:
@@ -2731,6 +2729,8 @@ static int home_dispatch_acquire(Home *h, Operation *o) {
27312729
return 0;
27322730
}
27332731

2732+
assert(!h->current_operation);
2733+
27342734
r = home_ratelimit(h, &error);
27352735
if (r >= 0)
27362736
r = call(h, o->secret, for_state, &error);

0 commit comments

Comments
 (0)