From 0a116abea3702b56cc8a37906988ae285a1c58be Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Sun, 12 May 2024 04:03:30 +0000 Subject: [PATCH] Test 03 --- src/fdcache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fdcache.cpp b/src/fdcache.cpp index 1fc2ac4336..9363fc46ba 100644 --- a/src/fdcache.cpp +++ b/src/fdcache.cpp @@ -746,13 +746,13 @@ void FdManager::Rename(const std::string &from, const std::string &to) bool FdManager::Close(FdEntity* ent, int fd) { - S3FS_PRN_DBG("[ent->file=%s][pseudo_fd=%d]", ent ? ent->GetPath().c_str() : "", fd); - if(!ent || -1 == fd){ return true; // returns success } AutoLock auto_lock(&FdManager::fd_manager_lock); + S3FS_PRN_DBG("[ent->file=%s][pseudo_fd=%d]", ent->GetPath().c_str(), fd); + for(fdent_map_t::iterator iter = fent.begin(); iter != fent.end(); ++iter){ if(iter->second.get() == ent){ ent->Close(fd);