diff options
Diffstat (limited to 'internal/fusefrontend')
| -rw-r--r-- | internal/fusefrontend/file.go | 6 | ||||
| -rw-r--r-- | internal/fusefrontend/fs.go | 5 | 
2 files changed, 3 insertions, 8 deletions
| diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index a0b82ba..531274a 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -44,8 +44,6 @@ type File struct {  	qIno openfiletable.QIno  	// Entry in the open file table  	fileTableEntry *openfiletable.Entry -	// go-fuse nodefs.loopbackFile -	loopbackFile nodefs.File  	// Store where the last byte was written  	lastWrittenOffset int64  	// The opCount is used to judge whether "lastWrittenOffset" is still @@ -75,7 +73,6 @@ func NewFile(fd *os.File, fs *FS) (*File, fuse.Status) {  		contentEnc:     fs.contentEnc,  		qIno:           qi,  		fileTableEntry: e, -		loopbackFile:   nodefs.NewLoopbackFile(fd),  		fs:             fs,  		File:           nodefs.NewDefaultFile(),  	}, fuse.OK @@ -474,5 +471,6 @@ func (f *File) GetAttr(a *fuse.Attr) fuse.Status {  func (f *File) Utimens(a *time.Time, m *time.Time) fuse.Status {  	f.fdLock.RLock()  	defer f.fdLock.RUnlock() -	return f.loopbackFile.Utimens(a, m) +	err := syscallcompat.FutimesNano(f.intFd(), a, m) +	return fuse.ToStatus(err)  } diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index 4c8af2d..096e663 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -372,10 +372,7 @@ func (fs *FS) Utimens(path string, a *time.Time, m *time.Time, context *fuse.Con  		return fuse.ToStatus(err)  	}  	defer syscall.Close(dirfd) -	ts := make([]unix.Timespec, 2) -	ts[0] = unix.Timespec(fuse.UtimeToTimespec(a)) -	ts[1] = unix.Timespec(fuse.UtimeToTimespec(m)) -	err = unix.UtimesNanoAt(dirfd, cName, ts, unix.AT_SYMLINK_NOFOLLOW) +	err = syscallcompat.UtimesNanoAtNofollow(dirfd, cName, a, m)  	return fuse.ToStatus(err)  } | 
