Commit 17598b8b authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

nodefs: fix style in doReadDir

parent 15ae7b59
...@@ -786,8 +786,10 @@ func (b *rawBridge) setStream(cancel <-chan struct{}, input *fuse.ReadIn, inode ...@@ -786,8 +786,10 @@ func (b *rawBridge) setStream(cancel <-chan struct{}, input *fuse.ReadIn, inode
} }
func (b *rawBridge) getStream(ctx context.Context, inode *Inode) (DirStream, syscall.Errno) { func (b *rawBridge) getStream(ctx context.Context, inode *Inode) (DirStream, syscall.Errno) {
rd, ok := inode.ops.(Readdirer) if rd, ok := inode.ops.(Readdirer); ok {
if !ok { return rd.Readdir(ctx)
}
r := []fuse.DirEntry{} r := []fuse.DirEntry{}
for k, ch := range inode.Children() { for k, ch := range inode.Children() {
r = append(r, fuse.DirEntry{Mode: ch.Mode(), r = append(r, fuse.DirEntry{Mode: ch.Mode(),
...@@ -795,9 +797,6 @@ func (b *rawBridge) getStream(ctx context.Context, inode *Inode) (DirStream, sys ...@@ -795,9 +797,6 @@ func (b *rawBridge) getStream(ctx context.Context, inode *Inode) (DirStream, sys
Ino: ch.StableAttr().Ino}) Ino: ch.StableAttr().Ino})
} }
return NewListDirStream(r), 0 return NewListDirStream(r), 0
}
return rd.Readdir(ctx)
} }
func (b *rawBridge) ReadDir(cancel <-chan struct{}, input *fuse.ReadIn, out *fuse.DirEntryList) fuse.Status { func (b *rawBridge) ReadDir(cancel <-chan struct{}, input *fuse.ReadIn, out *fuse.DirEntryList) 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