mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 01:08:54 +00:00
Fixing race condition in FdEntity::GetStats
This commit is contained in:
parent
566961c7a5
commit
cea7d44717
@ -1001,10 +1001,10 @@ bool FdEntity::OpenAndLoadAll(headers_t* pmeta, size_t* size, bool force_load)
|
||||
|
||||
bool FdEntity::GetStats(struct stat& st)
|
||||
{
|
||||
AutoLock auto_lock(&fdent_lock);
|
||||
if(-1 == fd){
|
||||
return false;
|
||||
}
|
||||
AutoLock auto_lock(&fdent_lock);
|
||||
|
||||
memset(&st, 0, sizeof(struct stat));
|
||||
if(-1 == fstat(fd, &st)){
|
||||
|
Loading…
Reference in New Issue
Block a user