From: Samuel Just Date: Fri, 26 Jul 2013 20:42:27 +0000 (-0700) Subject: FileStore: fix fd leak in _check_global_replay_guard X-Git-Tag: v0.67-rc3~46 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c562b72e703f671127d0ea2173f6a6907c825cd1;p=ceph.git FileStore: fix fd leak in _check_global_replay_guard Bug introduced in f3f92fe21061e21c8b259df5ef283a61782a44db. Fixes: #5766 Backport: cuttlefish Signed-off-by: Samuel Just Reviewed-by: Sage Weil --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 4e4847e69170..28f81b7547fd 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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;