summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/fuse/file.go
diff options
context:
space:
mode:
authorCraig Chi <craigchi@google.com>2020-09-09 16:30:25 -0700
committerAndrei Vagin <avagin@gmail.com>2020-09-11 13:35:25 -0700
commitb8bee78d0c99a0c9423061b3dda10b9ef8c9719d (patch)
treeaa7d47f5b1bf468cfc2706ba3991a49400a48231 /pkg/sentry/fsimpl/fuse/file.go
parent36bbf9e9668d1982afffbe069ab3b26a3822a1e7 (diff)
Unexport fusefs.inode.nodeID
Diffstat (limited to 'pkg/sentry/fsimpl/fuse/file.go')
-rw-r--r--pkg/sentry/fsimpl/fuse/file.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/sentry/fsimpl/fuse/file.go b/pkg/sentry/fsimpl/fuse/file.go
index b98145ba2..991efcda4 100644
--- a/pkg/sentry/fsimpl/fuse/file.go
+++ b/pkg/sentry/fsimpl/fuse/file.go
@@ -84,7 +84,7 @@ func (fd *fileDescription) Release(ctx context.Context) {
}
kernelTask := kernel.TaskFromContext(ctx)
// ignoring errors and FUSE server reply is analogous to Linux's behavior.
- req, err := conn.NewRequest(auth.CredentialsFromContext(ctx), uint32(kernelTask.ThreadID()), fd.inode().NodeID, opcode, &in)
+ req, err := conn.NewRequest(auth.CredentialsFromContext(ctx), uint32(kernelTask.ThreadID()), fd.inode().nodeID, opcode, &in)
if err != nil {
// No way to invoke Call() with an errored request.
return
@@ -125,8 +125,9 @@ func (fd *fileDescription) Stat(ctx context.Context, opts vfs.StatOptions) (linu
return inode.Stat(ctx, fs, opts)
}
-// SetStat implements FileDescriptionImpl.SetStat.
+// SetStat implements vfs.FileDescriptionImpl.SetStat.
func (fd *fileDescription) SetStat(ctx context.Context, opts vfs.SetStatOptions) error {
+ fs := fd.filesystem()
creds := auth.CredentialsFromContext(ctx)
- return fd.inode().setAttr(ctx, fd.inode().fs.VFSFilesystem(), creds, opts, true, fd.Fh)
+ return fd.inode().setAttr(ctx, fs, creds, opts, true, fd.Fh)
}