`lock_lambda` captures `ret` by reference, it will overwrites
returned value of `bucket_lc_process` when `wait_backoff` is called.
Fixes: c069eb7ff09b52003fa00a5cc83b1e52370032f5.
Signed-off-by: Tongliang Deng <dengtongliang@gmail.com>
utime_t lock_for_s(max_lock_secs, 0);
const auto& lock_lambda = [&]() {
- ret = lock->try_lock(this, lock_for_s, null_yield);
+ int ret = lock->try_lock(this, lock_for_s, null_yield);
if (ret == 0) {
return true;
}
if (ret == -EBUSY || ret == -EEXIST) {
/* already locked by another lc processor */
return false;
- }
+ }
return false;
};