Skip to content

Commit

Permalink
Another correction of file sync during destruction.
Browse files Browse the repository at this point in the history
  • Loading branch information
alja committed Jul 7, 2016
1 parent 3a622d0 commit eab846b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/XrdFileCache/XrdFileCacheFile.cc
Expand Up @@ -99,12 +99,10 @@ File::~File()
if (m_infoFile)
{
m_syncStatusMutex.Lock();
if ((! m_writes_during_sync.empty()) || m_non_flushed_cnt > 0)
{
Sync();
m_non_flushed_cnt = 0;
}
bool need_sync = (!m_writes_during_sync.empty()) || m_non_flushed_cnt > 0;
m_syncStatusMutex.UnLock();
if (need_sync)
Sync();

// write statistics in *cinfo file
AppendIOStatToFileInfo();
Expand Down

0 comments on commit eab846b

Please sign in to comment.