summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/mount.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-02-05 14:43:11 -0800
committerKevin Krakauer <krakauer@google.com>2020-02-05 14:43:11 -0800
commitbf0ea204e9415a181c63ee10078cca753df14f7e (patch)
treef4d149ac2bf2ea900f8b2a0cdea0a7a2ea7e6d0e /pkg/sentry/vfs/mount.go
parent29ad5762e4549d961f48c65292cfdeb7256524f6 (diff)
parentf2d3efca1deded31a2929ea77c0eecf476764660 (diff)
Merge branch 'master' into tcp-matchers-submit
Diffstat (limited to 'pkg/sentry/vfs/mount.go')
-rw-r--r--pkg/sentry/vfs/mount.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/sentry/vfs/mount.go b/pkg/sentry/vfs/mount.go
index d39528051..1fbb420f9 100644
--- a/pkg/sentry/vfs/mount.go
+++ b/pkg/sentry/vfs/mount.go
@@ -423,7 +423,8 @@ func (mntns *MountNamespace) IncRef() {
}
// DecRef decrements mntns' reference count.
-func (mntns *MountNamespace) DecRef(vfs *VirtualFilesystem) {
+func (mntns *MountNamespace) DecRef() {
+ vfs := mntns.root.fs.VirtualFilesystem()
if refs := atomic.AddInt64(&mntns.refs, -1); refs == 0 {
vfs.mountMu.Lock()
vfs.mounts.seq.BeginWrite()