mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Auto-commit fuse.cpp
This commit is contained in:
parent
d5a2187713
commit
02da8efbff
37 changed files with 374 additions and 267 deletions
|
|
@ -43,22 +43,10 @@ FUSE::fchmod(const fuse_req_ctx_t *ctx_,
|
|||
cu64 fh_,
|
||||
const mode_t mode_)
|
||||
{
|
||||
u64 fh;
|
||||
FileInfo *fi = FileInfo::from_fh(fh_);
|
||||
|
||||
fh = fh_;
|
||||
if(fh == 0)
|
||||
{
|
||||
state.open_files.cvisit(ctx_->nodeid,
|
||||
[&](auto &val_)
|
||||
{
|
||||
fh = val_.second.fi->to_fh();
|
||||
});
|
||||
}
|
||||
|
||||
if(fh == 0)
|
||||
return -ENOENT;
|
||||
|
||||
FileInfo *fi = FileInfo::from_fh(fh);
|
||||
if(not fi)
|
||||
return -EBADF;
|
||||
|
||||
return ::_fchmod(fi->fd,mode_);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue