From: Zhi Zhang Date: Tue, 12 Feb 2019 02:44:31 +0000 (+0800) Subject: mds: fix potential re-evaluate stray dentry in _unlink_local_finish X-Git-Tag: v13.2.5~18^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=27b6f67b56f0330f00b80d0311d518862cbf0608;p=ceph.git mds: fix potential re-evaluate stray dentry in _unlink_local_finish 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 (cherry picked from commit 72c93baac64211e9f02fa01e743451bf5d63d7a6) Conflicts: src/mds/MDCache.h : Resolved in notify_stray --- diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h index b8633c4945f..95cf75d2acb 100644 --- a/src/mds/MDCache.h +++ b/src/mds/MDCache.h @@ -193,6 +193,9 @@ public: */ 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); }