mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-28 19:06:39 -05:00
Rework open file resource management
This commit is contained in:
parent
b8776d205d
commit
5979b0ee3c
11 changed files with 734 additions and 309 deletions
|
|
@ -3800,7 +3800,7 @@ fuse_passthrough_open(const int fd_)
|
|||
|
||||
rv = ::ioctl(dev_fuse_fd,FUSE_DEV_IOC_BACKING_OPEN,&bm);
|
||||
|
||||
return rv;
|
||||
return ((rv < 0) ? INVALID_BACKING_ID : rv);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -3808,6 +3808,9 @@ fuse_passthrough_close(const int backing_id_)
|
|||
{
|
||||
int dev_fuse_fd;
|
||||
|
||||
if(!fuse_backing_id_is_valid(backing_id_))
|
||||
return 0;
|
||||
|
||||
dev_fuse_fd = f.se->fd;
|
||||
|
||||
return ::ioctl(dev_fuse_fd,FUSE_DEV_IOC_BACKING_CLOSE,&backing_id_);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue