summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/controller.go
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2019-08-02 11:21:50 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-02 11:23:11 -0700
commitaaaefdf9cadf033fa281b612315c3227f5ab1c7a (patch)
treec595502de931176a803ae917095fc552f133ed3a /runsc/boot/controller.go
parent6a1ac3407743adf7c0493ab9da97a1dff4e4b2ac (diff)
Remove kernel.mounts.
We can get the mount namespace from the CreateProcessArgs in all cases where we need it. This also gets rid of kernel.Destroy method, since the only thing it was doing was DecRefing the mounts. Removing the need to call kernel.SetRootMountNamespace also allowed for some more simplifications in the container fs setup code. PiperOrigin-RevId: 261357060
Diffstat (limited to 'runsc/boot/controller.go')
-rw-r--r--runsc/boot/controller.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go
index d79aaff60..f1e4a9ba4 100644
--- a/runsc/boot/controller.go
+++ b/runsc/boot/controller.go
@@ -328,10 +328,8 @@ func (cm *containerManager) Restore(o *RestoreOpts, _ *struct{}) error {
return fmt.Errorf("at most two files may be passed to Restore")
}
- networkStack := cm.l.k.NetworkStack()
- // Destroy the old kernel and create a new kernel.
+ // Pause the kernel while we build a new one.
cm.l.k.Pause()
- cm.l.k.Destroy()
p, err := createPlatform(cm.l.conf, deviceFile)
if err != nil {
@@ -345,6 +343,7 @@ func (cm *containerManager) Restore(o *RestoreOpts, _ *struct{}) error {
return fmt.Errorf("creating memory file: %v", err)
}
k.SetMemoryFile(mf)
+ networkStack := cm.l.k.NetworkStack()
cm.l.k = k
// Set up the restore environment.