mds: fix crash when REQSCATTER races with an actual scatter/MIX

This commit is contained in:
Sage Weil 2010-08-18 15:17:55 -07:00
parent c8701f29f0
commit 824de0d6e0

View File

@ -3792,7 +3792,8 @@ void Locker::handle_file_lock(ScatterLock *lock, MLock *m)
*/
dout(7) << "handle_file_lock got scatter request on " << *lock
<< " on " << *lock->get_parent() << dendl;
file_mixed(lock);
if (lock->get_state() != LOCK_MIX) // i.e., the reqscatter didn't race with an actual mix/scatter
file_mixed(lock);
} else {
dout(7) << "handle_file_lock ignoring scatter request on " << *lock
<< " on " << *lock->get_parent() << dendl;