We don't want auth_pins on the locallocks (they're never auth_pinned)
and we only want new auth_pins that are for locks on the inode that we
imported -- not for each xlock that the mdr has everywhere (like,
say, on the srcdn)!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
for (set<SimpleLock *>::iterator i = mdr->xlocks.begin();
i != mdr->xlocks.end();
++i)
- destdnl->get_inode()->auth_pin(*i);
+ if (!(*i)->is_locallock() &&
+ (*i)->get_parent() == destdnl->get_inode())
+ destdnl->get_inode()->auth_pin(*i);
}
// hack: fix auth bit