From: Sam Lang Date: Mon, 25 Mar 2013 16:43:54 +0000 (-0500) Subject: client: Always cleanup request after safe X-Git-Tag: v0.62~171^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dfb46b9a32e0465f5f4faba21846d42b8051f1e8;p=ceph.git client: Always cleanup request after safe The client MetaRequest should always be cleaned up and removed from the mds_requests map once the client gets a safe reply. This patch avoids a leak where the mds does not send back an unsafe reply and the request is never cleaned up. Signed-off-by: Sam Lang --- diff --git a/src/client/Client.cc b/src/client/Client.cc index f9e75f63c9b..6c90844c184 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -1751,13 +1751,13 @@ void Client::handle_client_reply(MClientReply *reply) if (is_safe) { // the filesystem change is committed to disk + // we're done, clean up if (request->got_unsafe) { - // we're done, clean up - request->item.remove_myself(); request->unsafe_item.remove_myself(); - mds_requests.erase(tid); - request->put(); // for the dumb data structure } + request->item.remove_myself(); + mds_requests.erase(tid); + request->put(); // for the dumb data structure } if (unmounting) mount_cond.Signal();