]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: avoid double auth pin for file recovery
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 14 Mar 2013 02:11:31 +0000 (10:11 +0800)
committerGreg Farnum <greg@inktank.com>
Mon, 1 Apr 2013 16:26:23 +0000 (09:26 -0700)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/mds/MDCache.cc

index 9e1d80f09624360591e37af5e1571ae79bf135cf..ac922ed69f9ee776ce1adb3667079f7bbb6377d9 100644 (file)
@@ -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);
 }