I don't remember why we needed can_xlock_local() to begin with, but
I can tell that adding this get_xlock_by() check won't stop anything
working that was ever working to begin with (really it's still not
strong enough a check).
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
}
bool can_xlock_local() const {
- return !is_wrlocked();
+ return !is_wrlocked() && (get_xlock_by() == 0);
}
bool can_wrlock() const {