]> 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:46:26 +0000 (13:46 -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>
src/os/FileStore.cc

index 4e4847e69170e3cfde0105d593a97b5fd66e8d66..28f81b7547fd022760bc0038a00bc0fe1281a80c 100644 (file)
@@ -2243,6 +2243,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;