summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/overlay/filesystem.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-09-08 21:45:50 +0000
committergVisor bot <gvisor-bot@google.com>2020-09-08 21:45:50 +0000
commitb6dfbd39e22978a9f70960d60c1a7ab5ab770a67 (patch)
treed32e62843ab12e44b47de2428ec7a31a856d15a3 /pkg/sentry/fsimpl/overlay/filesystem.go
parent71e560ec44aadbe9675b0eebbc4b54634a52919a (diff)
parent682c0edcdcdfbf26be5d0d6efa2319f6f5259df2 (diff)
Merge release-20200818.0-133-g682c0edcd (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/overlay/filesystem.go')
-rw-r--r--pkg/sentry/fsimpl/overlay/filesystem.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/overlay/filesystem.go b/pkg/sentry/fsimpl/overlay/filesystem.go
index 87afeeaf3..b530851c5 100644
--- a/pkg/sentry/fsimpl/overlay/filesystem.go
+++ b/pkg/sentry/fsimpl/overlay/filesystem.go
@@ -211,6 +211,7 @@ func (fs *filesystem) lookupLocked(ctx context.Context, parent *dentry, name str
lookupErr = err
return false
}
+ defer childVD.DecRef(ctx)
mask := uint32(linux.STATX_TYPE)
if !existsOnAnyLayer {
@@ -249,6 +250,7 @@ func (fs *filesystem) lookupLocked(ctx context.Context, parent *dentry, name str
}
// Update child to include this layer.
+ childVD.IncRef()
if isUpper {
child.upperVD = childVD
child.copiedUp = 1