]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: fix fd leak in _check_global_replay_guard
authorSamuel Just <sam.just@inktank.com>
Fri, 26 Jul 2013 20:42:27 +0000 (13:42 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 26 Jul 2013 20:47:43 +0000 (13:47 -0700)
Bug introduced in f3f92fe21061e21c8b259df5ef283a61782a44db.

Fixes: #5766
Backport: cuttlefish
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c562b72e703f671127d0ea2173f6a6907c825cd1)

src/os/FileStore.cc

index c764d6bef2a150e968e1ed2e12f94797425af834..5bd581f6254fec61729fce512c8e68063219e45b 100644 (file)
@@ -2217,6 +2217,7 @@ int FileStore::_check_global_replay_guard(coll_t cid,
   if (r < 0) {
     dout(20) << __func__ << " no xattr" << dendl;
     assert(!m_filestore_fail_eio || r != -EIO);
+    TEMP_FAILURE_RETRY(::close(fd));
     return 1;  // no xattr
   }
   bufferlist bl;