summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-07 23:38:19 +0000
committergVisor bot <gvisor-bot@google.com>2020-08-07 23:38:19 +0000
commit697f4ec7f8314b7e37979984bc16e23c7048b9a6 (patch)
treeb9ace1903f0c95d1d3fe153cab82845889a58d86 /pkg/sentry
parent9052e0019bfea40349b8d47d13bc73916ed7f10f (diff)
parent0b7cd1e751f70cf6b335754d2b173d9c12b674c7 (diff)
Merge release-20200804.0-45-g0b7cd1e75 (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/fsimpl/gofer/gofer.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/gofer/gofer.go b/pkg/sentry/fsimpl/gofer/gofer.go
index f1d3bf911..4ac8dd81d 100644
--- a/pkg/sentry/fsimpl/gofer/gofer.go
+++ b/pkg/sentry/fsimpl/gofer/gofer.go
@@ -1264,8 +1264,11 @@ func (d *dentry) destroyLocked(ctx context.Context) {
}
}
// Discard cached data.
- d.cache.DropAll(mf)
- d.dirty.RemoveAll()
+ if !d.cache.IsEmpty() {
+ mf.MarkAllUnevictable(d)
+ d.cache.DropAll(mf)
+ d.dirty.RemoveAll()
+ }
d.dataMu.Unlock()
// Clunk open fids and close open host FDs.
if !d.readFile.isNil() {