summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-04-09 01:06:24 +0000
committergVisor bot <gvisor-bot@google.com>2021-04-09 01:06:24 +0000
commit983fc7860c0644fbcfc1eaa1ad301837612e6187 (patch)
tree37bb29189ae6c36f840fdea9919ee36662bbcdf1 /pkg
parent0525a6fbfbba7f2792c31937caaaab4e154741a5 (diff)
parent496a3654e7af2ee905c1183c622687c6af29069b (diff)
Merge release-20210408.0-8-g496a3654e (automated)
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/fsimpl/verity/filesystem.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/verity/filesystem.go b/pkg/sentry/fsimpl/verity/filesystem.go
index 6cb1a23e0..214ffd095 100644
--- a/pkg/sentry/fsimpl/verity/filesystem.go
+++ b/pkg/sentry/fsimpl/verity/filesystem.go
@@ -632,8 +632,6 @@ func (fs *filesystem) lookupAndVerifyLocked(ctx context.Context, parent *dentry,
childVD.IncRef()
childMerkleVD.IncRef()
- parent.IncRef()
- child.parent = parent
child.name = name
child.mode = uint32(stat.Mode)
@@ -657,6 +655,9 @@ func (fs *filesystem) lookupAndVerifyLocked(ctx context.Context, parent *dentry,
}
}
+ parent.IncRef()
+ child.parent = parent
+
return child, nil
}