]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix some memory leak
authorYan, Zheng <zyan@redhat.com>
Fri, 25 May 2018 08:11:30 +0000 (16:11 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 30 May 2018 03:45:05 +0000 (11:45 +0800)
Fixes: http://tracker.ceph.com/issues/24289
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit e7c149b93dc384ee4a2c8250c502548d12535123)

src/mds/Beacon.cc
src/mds/Migrator.cc
src/mds/Server.cc

index ea59c57b827c43b5e6ce3a57ff5982b26a0ebbd1..e94390f65bf4fbb834ade342b9bcfbc85547058f 100644 (file)
@@ -142,6 +142,7 @@ void Beacon::handle_mds_beacon(MMDSBeacon *m)
     dout(10) << "handle_mds_beacon " << ceph_mds_state_name(m->get_state())
             << " seq " << m->get_seq() << " dne" << dendl;
   }
+  m->put();
 }
 
 
index 1e2a3a302f6520269e53e09ddc7859e8aee4a87f..f1ccdd898a6690e695153fc8b2cfbdde73897ec2 100644 (file)
@@ -3326,8 +3326,11 @@ void Migrator::handle_export_caps(MExportCaps *ex)
   assert(in->is_auth());
 
   // FIXME
-  if (!in->can_auth_pin())
+  if (!in->can_auth_pin()) {
+    ex->put();
     return;
+  }
+
   in->auth_pin(this);
 
   C_M_LoggedImportCaps *finish = new C_M_LoggedImportCaps(
index 5132ece9e57cd433facaeb8f95e0104d3bd6c8b3..04a85d2673830ec35b28f960a347c8031019e470 100644 (file)
@@ -1959,6 +1959,7 @@ void Server::handle_slave_request(MMDSSlaveRequest *m)
       } else {
        mdcache->request_finish(mdr);
       }
+      m->put();
       return;
     }
   }