MDSCacheObject *obj = lock->get_parent();
if (it->is_xlock()) {
- if (obj->is_auth()) {
+ if (obj->is_auth() || lock->is_locallock()) {
bool ni = false;
xlock_finish(it++, mut, &ni);
if (ni)
for (const auto& q : mdr->locks) {
auto lock = q.lock;
auto obj = lock->get_parent();
- if (q.is_xlock() && !obj->is_auth()) {
+ if (q.is_xlock() && !obj->is_auth() && !lock->is_locallock()) {
mds_rank_t who = obj->authority().first;
if (rejoins.count(who) == 0) continue;
const auto& rejoin = rejoins[who];
for (auto it = mdr->locks.begin(); it != mdr->locks.end(); ) {
SimpleLock *lock = it->lock;
- if (it->is_xlock() && !lock->get_parent()->is_auth()) {
+ if (!lock->is_locallock() && it->is_xlock() && !lock->get_parent()->is_auth()) {
dout(10) << "request_drop_foreign_locks forgetting lock " << *lock
<< " on " << lock->get_parent() << dendl;
lock->put_xlock();
SimpleLock *lock = mds->locker->get_lock(mdr->peer_request->get_lock_type(),
mdr->peer_request->get_object_info());
+ // we shouldn't be getting peer requests about local locks
+ ceph_assert(!lock->is_locallock());
+
if (!lock) {
dout(10) << "don't have object, dropping" << dendl;
ceph_abort_msg("don't have object"); // can this happen, if we auth pinned properly.