summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/mount.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-02-04 11:47:41 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-04 11:48:36 -0800
commitdcffddf0cae026411e7e678744a1e39dc2b513cf (patch)
tree69aef160d054425039e1f772e5c6b0b2654f71b5 /pkg/sentry/vfs/mount.go
parent492229d0176c1af2ab4ea4cf91bf211e940b5b12 (diff)
Remove argument from vfs.MountNamespace.DecRef()
Updates #1035 PiperOrigin-RevId: 293194631
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()