We generally return > 1 if any of the actions we are doing is instantly
complete and == 0 when we started doing it asynchronously (by forking
off homework), in our functions that execute operations on homes.
Fix a mix-up where the test for this was reversed in
home_dispatch_release() and home_dispatch_lock_all().
Fixes: #15684
case HOME_UNFIXATED:
case HOME_ABSENT:
case HOME_INACTIVE:
- r = 0; /* done */
+ r = 1; /* done */
break;
case HOME_LOCKED:
assert(!h->current_operation);
- if (r <= 0) /* failure or completed */
+ if (r != 0) /* failure or completed */
operation_result(o, r, &error);
else /* ongoing */
h->current_operation = operation_ref(o);
case HOME_ABSENT:
case HOME_INACTIVE:
log_info("Home %s is not active, no locking necessary.", h->user_name);
- r = 0; /* done */
+ r = 1; /* done */
break;
case HOME_LOCKED:
log_info("Home %s is already locked.", h->user_name);
- r = 0; /* done */
+ r = 1; /* done */
break;
case HOME_ACTIVE: