Skip to content

Commit 3f9c8eb

Browse files
committed
Refactor parameters
1 parent 5c2fff5 commit 3f9c8eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ctriface/iface.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,10 @@ func (o *Orchestrator) LoadSnapshot(ctx context.Context, vmID string, snap *snap
498498
conf.MemFilePath = snap.GetMemFilePath()
499499
conf.ContainerSnapshotPath = containerSnap.GetDevicePath()
500500

501-
if conf.MemBackend == nil {
502-
conf.MemBackend = &proto.MemoryBackend{}
501+
conf.MemBackend = &proto.MemoryBackend{
502+
BackendType: fileBackend,
503+
BackendPath: snap.GetMemFilePath(),
503504
}
504-
conf.MemBackend.BackendType = fileBackend
505-
conf.MemBackend.BackendPath = snap.GetMemFilePath()
506505

507506
if o.GetUPFEnabled() {
508507
conf.MemBackend.BackendType = uffdBackend

0 commit comments

Comments
 (0)