return;
}
- int r;
if (image_ctx.exclusive_lock->is_lock_owner() &&
- image_ctx.exclusive_lock->accept_requests(&r)) {
+ image_ctx.exclusive_lock->accept_requests()) {
send_local_request();
owner_lock.put_read();
return;
}
// need to upgrade to a write lock
- int r = 0;
bool trying_lock = false;
C_SaferCond ctx;
m_image_ctx.owner_lock.put_read();
RWLock::WLocker owner_locker(m_image_ctx.owner_lock);
if (m_image_ctx.exclusive_lock != nullptr &&
(!m_image_ctx.exclusive_lock->is_lock_owner() ||
- !m_image_ctx.exclusive_lock->accept_requests(&r))) {
+ !m_image_ctx.exclusive_lock->accept_requests())) {
m_image_ctx.exclusive_lock->try_acquire_lock(&ctx);
trying_lock = true;
}
}
+ int r = 0;
if (trying_lock) {
r = ctx.wait();
}