If MDS handles cap release before _unlink_local_finish, then when MDS
processes _unlink_local_finish, eval_stray might be re-entered twice,
so this will cause crashing.
Fixes: http://tracker.ceph.com/issues/38263
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
(cherry picked from commit
72c93baac64211e9f02fa01e743451bf5d63d7a6)
Conflicts:
src/mds/MDCache.h : Resolved in notify_stray
*/
void notify_stray(CDentry *dn) {
assert(dn->get_dir()->get_inode()->is_stray());
+ if (dn->state_test(CDentry::STATE_PURGING))
+ return;
+
stray_manager.eval_stray(dn);
}