Fix query of attr during symlink

Using getattr when follow-symlink is enabled causes invalid type to the kernel
if symlink pointed to non-symlink.
This commit is contained in:
Antonio SJ Musumeci 2022-03-19 15:15:34 -04:00
parent 015002ebd9
commit c9a935835f
3 changed files with 54 additions and 35 deletions

View file

@ -239,8 +239,9 @@ namespace l
if(rv == 0)
rv = FUSE::getattr(oldpath_,st_,timeouts_);
// Disable attr caching since we created a symlink but should be a regular.
timeouts_->attr = 0;
// Disable caching since we created a symlink but should be a regular.
timeouts_->attr = 0;
timeouts_->entry = 0;
return rv;
}
@ -268,8 +269,9 @@ namespace l
if(rv == 0)
rv = FUSE::getattr(oldpath_,st_,timeouts_);
// Disable attr caching since we created a symlink but should be a regular.
timeouts_->attr = 0;
// Disable caching since we created a symlink but should be a regular.
timeouts_->attr = 0;
timeouts_->entry = 0;
return rv;
}
@ -292,8 +294,9 @@ namespace l
if(rv == 0)
rv = FUSE::getattr(oldpath_,st_,timeouts_);
// Disable attr caching since we created a symlink but should be a regular.
timeouts_->attr = 0;
// Disable caching since we created a symlink but should be a regular.
timeouts_->attr = 0;
timeouts_->entry = 0;
return rv;
}