This fixes a possible infinite loop in handle_client_caps(). We need to
_always_ pass the head inode in.
break;
// next!
- in = mdcache->pick_inode_snap(in, in->last);
+ in = mdcache->pick_inode_snap(head_in, in->last);
cap = in->get_client_cap(client);
assert(cap);
}
CInode *MDCache::pick_inode_snap(CInode *in, snapid_t follows)
{
dout(10) << "pick_inode_snap follows " << follows << " on " << *in << dendl;
+ assert(in->last == CEPH_NOSNAP);
SnapRealm *realm = in->find_snaprealm();
const set<snapid_t>& snaps = realm->get_snaps();