mdcache->num_inodes_with_caps--;
}
mdcache->num_caps--;
+
+ //clean up advisory locks
+ bool fcntl_removed = fcntl_locks.remove_all_from(client);
+ bool flock_removed = flock_locks.remove_all_from(client);
+ if (fcntl_removed || flock_removed) {
+ list<Context*> waiters;
+ take_waiting(CInode::WAIT_FLOCK, waiters);
+ mdcache->mds->queue_waiters(waiters);
+ }
}
void CInode::move_to_realm(SnapRealm *realm)
/* For now we're ignoring the activated locks because their responses
* will be sent when the lock comes up again in rotation by the MDS.
* It's a cheap hack, but it's easy to code. */
+ list<Context*> waiters;
+ cur->take_waiting(CInode::WAIT_FLOCK, waiters);
+ mds->queue_waiters(waiters);
} else {
if (lock_state->add_lock(set_lock, will_wait)) {
// lock set successfully