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.61.8~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5af48dc7c7e3a0d7f7bc22af58831d58d165e657;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 (cherry picked from commit c562b72e703f671127d0ea2173f6a6907c825cd1) --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index c764d6bef2a..5bd581f6254 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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;