Commit a7349e99 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse/nodefs: drop rawDir interface

parent 9c4ededa
......@@ -85,12 +85,7 @@ func (d *connectorDir) ReadDirPlus(list *fuse.DirEntryList, input *raw.ReadIn, c
}
// Read everything so we make goroutines exit.
func (d *connectorDir) Release() {
}
type rawDir interface {
ReadDir(out *fuse.DirEntryList, input *raw.ReadIn, c *fuse.Context) fuse.Status
ReadDirPlus(out *fuse.DirEntryList, input *raw.ReadIn, c *fuse.Context) fuse.Status
Release()
}
......@@ -17,7 +17,7 @@ type openedFile struct {
WithFlags
dir rawDir
dir *connectorDir
}
type fileSystemMount struct {
......@@ -108,7 +108,7 @@ func (m *fileSystemMount) unregisterFileHandle(handle uint64, node *Inode) *open
return opened
}
func (m *fileSystemMount) registerFileHandle(node *Inode, dir rawDir, f File, flags uint32) (uint64, *openedFile) {
func (m *fileSystemMount) registerFileHandle(node *Inode, dir *connectorDir, f File, flags uint32) (uint64, *openedFile) {
node.openFilesMutex.Lock()
b := &openedFile{
dir: dir,
......
......@@ -363,8 +363,7 @@ func (c *rawBridge) Release(context *fuse.Context, input *raw.ReleaseIn) {
func (c *rawBridge) ReleaseDir(context *fuse.Context, input *raw.ReleaseIn) {
node := c.toInode(context.NodeId)
opened := node.mount.unregisterFileHandle(input.Fh, node)
opened.dir.Release()
node.mount.unregisterFileHandle(input.Fh, node)
}
func (c *rawBridge) GetXAttrSize(context *fuse.Context, attribute string) (sz int, code fuse.Status) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment