summaryrefslogtreecommitdiffhomepage
path: root/runsc
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-07-12 20:43:12 +0000
committergVisor bot <gvisor-bot@google.com>2019-07-12 20:43:12 +0000
commit9d44403d6a3b4b00689a910ab9f93f2fc1d4cdba (patch)
tree03447fbb0a3c41abebac7b030c777fec6e10c858 /runsc
parent702bdfcc32014c20a95a5d6a82c452f20865be7f (diff)
parent6116473b2ffdea90a4a97196e265c6d93e53ce00 (diff)
Merge 6116473b (automated)
Diffstat (limited to 'runsc')
-rw-r--r--runsc/boot/fs.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index f9a6f2d3c..d3e3196fd 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -906,7 +906,10 @@ func (c *containerMounter) mountSharedSubmount(ctx context.Context, mns *fs.Moun
}
defer target.DecRef()
+ // Take a ref on the inode that is about to be (re)-mounted.
+ source.root.IncRef()
if err := mns.Mount(ctx, target, source.root); err != nil {
+ source.root.DecRef()
return fmt.Errorf("bind mount %q error: %v", mount.Destination, err)
}