summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-11-06 21:05:57 +0000
committergVisor bot <gvisor-bot@google.com>2020-11-06 21:05:57 +0000
commitad0d64d3307cf2a9fdca458f32288dcd645a7f1a (patch)
treeee1e3b6bb02fe0eebc39799d75a9d17df90ca01a /pkg/sentry
parentd93a73d74bd730a39bacbb4831e366fa0ff8a8b6 (diff)
parentbcd883f095d62ef790889e5516adc4f437512726 (diff)
Merge release-20201030.0-42-gbcd883f09 (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/fsimpl/kernfs/filesystem.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/kernfs/filesystem.go b/pkg/sentry/fsimpl/kernfs/filesystem.go
index 50aeab908..d125435d9 100644
--- a/pkg/sentry/fsimpl/kernfs/filesystem.go
+++ b/pkg/sentry/fsimpl/kernfs/filesystem.go
@@ -264,7 +264,7 @@ func (fs *Filesystem) Release(ctx context.Context) {
//
// Precondition: Filesystem.mu is held.
func (d *Dentry) releaseKeptDentriesLocked(ctx context.Context) {
- if d.inode.Keep() {
+ if d.inode.Keep() && d != d.fs.root {
d.decRefLocked(ctx)
}