Revert removal of readdir init setup, simplify cfg usage (#1520)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled

This commit is contained in:
trapexit 2025-09-06 12:03:51 -04:00 • committed by GitHub
parent 99c28ad3bc
commit f64ff9ca1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 388 additions and 426 deletions

View file

@ -52,7 +52,6 @@ FUSE::fgetattr(const uint64_t fh_,
{
int rv;
uint64_t fh;
Config::Read cfg;
const fuse_context *fc = fuse_get_context();
fh = fh_;
@ -67,7 +66,7 @@ FUSE::fgetattr(const uint64_t fh_,
if(fh == 0)
{
timeout_->entry = cfg->cache_negative_entry;
timeout_->entry = cfg.cache_negative_entry;
return -ENOENT;
}
@ -76,9 +75,9 @@ FUSE::fgetattr(const uint64_t fh_,
rv = ::_fgetattr(fi,st_);
timeout_->entry = ((rv >= 0) ?
cfg->cache_entry :
cfg->cache_negative_entry);
timeout_->attr = cfg->cache_attr;
cfg.cache_entry :
cfg.cache_negative_entry);
timeout_->attr = cfg.cache_attr;
return rv;
}