]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: break ancestor walk if node is export_pinned
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 25 Apr 2017 15:13:44 +0000 (11:13 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 25 Apr 2017 15:14:21 +0000 (11:14 -0400)
i.e. don't keep walking the parents after adding the ancestor (or the node
itself) to the export_pin_queue.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/CInode.cc

index d551f1837e1ed5df99d6cbc4a195321323f915de..73054cb8375fb2fff08813fd4c995b5b423792b6 100644 (file)
@@ -4414,9 +4414,8 @@ void CInode::maybe_export_pin()
           if (pin != mdcache->mds->get_nodeid()) {
             dout(20) << "adding ancestor to export_pin_queue " << *auth_last << dendl;
             mdcache->export_pin_queue.insert(auth_last);
-          } else {
-            break; /* it is correctly pinned here! */
           }
+          break;
         }
       }
     } else {