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

fs: always set Mode correctly for Setattr output

parent 1d6f9351
...@@ -427,14 +427,15 @@ func (b *rawBridge) SetAttr(cancel <-chan struct{}, in *fuse.SetAttrIn, out *fus ...@@ -427,14 +427,15 @@ func (b *rawBridge) SetAttr(cancel <-chan struct{}, in *fuse.SetAttrIn, out *fus
f = nil f = nil
} }
var errno = syscall.ENOTSUP
if fops, ok := n.ops.(NodeSetattrer); ok { if fops, ok := n.ops.(NodeSetattrer); ok {
return errnoToStatus(fops.Setattr(ctx, f, in, out)) errno = fops.Setattr(ctx, f, in, out)
} } else if fops, ok := f.(FileSetattrer); ok {
if fops, ok := f.(FileSetattrer); ok { errno = fops.Setattr(ctx, in, out)
return errnoToStatus(fops.Setattr(ctx, in, out))
} }
return fuse.ENOTSUP out.Mode = n.stableAttr.Mode | (out.Mode & 07777)
return errnoToStatus(errno)
} }
func (b *rawBridge) Rename(cancel <-chan struct{}, input *fuse.RenameIn, oldName string, newName string) fuse.Status { func (b *rawBridge) Rename(cancel <-chan struct{}, input *fuse.RenameIn, oldName string, newName string) 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