summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs
diff options
context:
space:
mode:
authorZhaozhong Ni <nzz@google.com>2018-08-07 10:26:17 -0700
committerShentubot <shentubot@google.com>2018-08-07 10:27:37 -0700
commitc348d0786388ded1a4bad3c98000b4653724c764 (patch)
treeb6cab18c5b8e440bba0b5c9b032663ad895bcf07 /pkg/sentry/fs
parentd839dc13c689f853fd87c495c26208048a540919 (diff)
sentry: make epoll.pollEntry wait for the file operation in restore.
PiperOrigin-RevId: 207737935 Change-Id: I3a301ece1f1d30909715f36562474e3248b6a0d5
Diffstat (limited to 'pkg/sentry/fs')
-rw-r--r--pkg/sentry/fs/file.go2
-rw-r--r--pkg/sentry/fs/host/inode.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fs/file.go b/pkg/sentry/fs/file.go
index 8e535a618..904827a3e 100644
--- a/pkg/sentry/fs/file.go
+++ b/pkg/sentry/fs/file.go
@@ -91,7 +91,7 @@ type File struct {
mu amutex.AbortableMutex `state:"nosave"`
// FileOperations implements file system specific behavior for this File.
- FileOperations FileOperations
+ FileOperations FileOperations `state:"wait"`
// offset is the File's offset. Updating offset is protected by mu but
// can be read atomically via File.Offset() outside of mu.
diff --git a/pkg/sentry/fs/host/inode.go b/pkg/sentry/fs/host/inode.go
index 761ccde33..66c17debb 100644
--- a/pkg/sentry/fs/host/inode.go
+++ b/pkg/sentry/fs/host/inode.go
@@ -77,7 +77,7 @@ type inodeFileState struct {
descriptor *descriptor `state:"wait"`
// Event queue for blocking operations.
- queue waiter.Queue `state:"nosave"`
+ queue waiter.Queue `state:"zerovalue"`
// sattr is used to restore the inodeOperations.
sattr fs.StableAttr `state:"wait"`