Skip to content

Commit 6e55a4d

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)
1 parent a95176e commit 6e55a4d

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
@@ -2692,8 +2692,6 @@ static int home_dispatch_acquire(Home *h, Operation *o) {
26922692
assert(o);
26932693
assert(o->type == OPERATION_ACQUIRE);
26942694

2695-
assert(!h->current_operation);
2696-
26972695
switch (home_get_state(h)) {
26982696

26992697
case HOME_UNFIXATED:
@@ -2729,6 +2727,8 @@ static int home_dispatch_acquire(Home *h, Operation *o) {
27292727
return 0;
27302728
}
27312729

2730+
assert(!h->current_operation);
2731+
27322732
r = home_ratelimit(h, &error);
27332733
if (r >= 0)
27342734
r = call(h, o->secret, for_state, &error);

0 commit comments

Comments
 (0)