Use same time when creating directory objects (#1652)

This avoids mismatched times and is slightly faster.
This commit is contained in:
Andrew Gaul 2021-05-09 13:44:12 +09:00 committed by GitHub
parent 9d8f1b00f7
commit 9abe3fa662
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1045,7 +1045,8 @@ static int s3fs_mkdir(const char* _path, mode_t mode)
}
return result;
}
result = create_directory_object(path, mode, time(NULL), time(NULL), time(NULL), pcxt->uid, pcxt->gid);
time_t now = time(NULL);
result = create_directory_object(path, mode, now, now, now, pcxt->uid, pcxt->gid);
StatCache::getStatCacheData()->DelStat(path);
S3FS_MALLOCTRIM(0);