diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-07 23:38:19 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-07 23:38:19 +0000 |
commit | 697f4ec7f8314b7e37979984bc16e23c7048b9a6 (patch) | |
tree | b9ace1903f0c95d1d3fe153cab82845889a58d86 /pkg/sentry/fsimpl | |
parent | 9052e0019bfea40349b8d47d13bc73916ed7f10f (diff) | |
parent | 0b7cd1e751f70cf6b335754d2b173d9c12b674c7 (diff) |
Merge release-20200804.0-45-g0b7cd1e75 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl')
-rw-r--r-- | pkg/sentry/fsimpl/gofer/gofer.go | 7 |
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() { |