From: Yan, Zheng Date: Thu, 14 Mar 2013 02:11:31 +0000 (+0800) Subject: mds: avoid double auth pin for file recovery X-Git-Tag: v0.62~120^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b4395889d78129f21d69a67932a367b4911f6870;p=ceph.git mds: avoid double auth pin for file recovery Signed-off-by: Yan, Zheng Reviewed-by: Greg Farnum --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 9e1d80f09624..ac922ed69f9e 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5495,8 +5495,10 @@ void MDCache::_queue_file_recover(CInode *in) dout(15) << "_queue_file_recover " << *in << dendl; assert(in->is_auth()); in->state_clear(CInode::STATE_NEEDSRECOVER); - in->state_set(CInode::STATE_RECOVERING); - in->auth_pin(this); + if (!in->state_test(CInode::STATE_RECOVERING)) { + in->state_set(CInode::STATE_RECOVERING); + in->auth_pin(this); + } file_recover_queue.insert(in); }