summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/fuse/fusefs.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fsimpl/fuse/fusefs.go')
-rw-r--r--pkg/sentry/fsimpl/fuse/fusefs.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/fuse/fusefs.go b/pkg/sentry/fsimpl/fuse/fusefs.go
index cfae9ed0d..8cf13dcb6 100644
--- a/pkg/sentry/fsimpl/fuse/fusefs.go
+++ b/pkg/sentry/fsimpl/fuse/fusefs.go
@@ -18,6 +18,7 @@ package fuse
import (
"math"
"strconv"
+ "sync"
"sync/atomic"
"gvisor.dev/gvisor/pkg/abi/linux"
@@ -228,13 +229,18 @@ type inode struct {
kernfs.InodeNotSymlink
kernfs.OrderedChildren
- NodeID uint64
dentry kernfs.Dentry
- locks vfs.FileLocks
// the owning filesystem. fs is immutable.
fs *filesystem
+ // metaDataMu protects the metadata of this inode.
+ metadataMu sync.Mutex
+
+ NodeID uint64
+
+ locks vfs.FileLocks
+
// size of the file.
size uint64