]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix CInode::adjust_nested_auth_pin()
authorSage Weil <sage@newdream.net>
Mon, 12 Jan 2009 00:48:02 +0000 (16:48 -0800)
committerSage Weil <sage@newdream.net>
Mon, 12 Jan 2009 00:48:02 +0000 (16:48 -0800)
Adjust nested_auth_pins even if no parent.  There will be eventually.

src/mds/CInode.cc

index 588d703ca207e0febde16f615ca190bfc63aae91..90516a84bfd0b88669bd2c6c491cc6a240391db9 100644 (file)
@@ -1103,15 +1103,14 @@ void CInode::auth_unpin(void *by)
 
 void CInode::adjust_nested_auth_pins(int a)
 {
-  if (!parent) return;
   nested_auth_pins += a;
-
   dout(35) << "adjust_nested_auth_pins by " << a
           << " now " << auth_pins << "+" << nested_auth_pins
           << dendl;
   assert(nested_auth_pins >= 0);
 
-  parent->adjust_nested_auth_pins(a, 0);
+  if (parent)
+    parent->adjust_nested_auth_pins(a, 0);
 }
 
 void CInode::adjust_nested_anchors(int by)