Skip to content

Commit

Permalink
Test 03
Browse files Browse the repository at this point in the history
  • Loading branch information
ggtakec committed May 12, 2024
1 parent a7af7c8 commit 0a116ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fdcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0a116ab

Please sign in to comment.