nametransform: ReadDirIVAt: return raw syscall error

Otherwise this can happen, as triggered by xfstests generic/011:

  go-fuse: can't convert error type: openat failed: too many open files

The app then gets a misleading "Function not implemented" error.
This commit is contained in:
Jakob Unterwurzacher 2019-01-04 23:21:27 +01:00
parent 3473a84963
commit 8074f12beb

View File

@ -29,7 +29,7 @@ func ReadDirIVAt(dirfd int) (iv []byte, err error) {
fdRaw, err := syscallcompat.Openat(dirfd, DirIVFilename, fdRaw, err := syscallcompat.Openat(dirfd, DirIVFilename,
syscall.O_RDONLY|syscall.O_NOFOLLOW, 0) syscall.O_RDONLY|syscall.O_NOFOLLOW, 0)
if err != nil { if err != nil {
return nil, fmt.Errorf("openat failed: %v", err) return nil, err
} }
fd := os.NewFile(uintptr(fdRaw), DirIVFilename) fd := os.NewFile(uintptr(fdRaw), DirIVFilename)
defer fd.Close() defer fd.Close()