From b45b101240b18b7648c3058254b1933ed397651d Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 4 Feb 2016 14:30:32 -0800 Subject: [PATCH] Serialize the list of mounted entries in the alloc dir --- client/allocdir/alloc_dir.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/allocdir/alloc_dir.go b/client/allocdir/alloc_dir.go index dd2ac6afe..e5200be41 100644 --- a/client/allocdir/alloc_dir.go +++ b/client/allocdir/alloc_dir.go @@ -36,7 +36,7 @@ type AllocDir struct { TaskDirs map[string]string // A list of locations the shared alloc has been mounted to. - mounted []string + Mounted []string } // AllocFileInfo holds information about a file inside the AllocDir @@ -64,7 +64,7 @@ func NewAllocDir(allocDir string) *AllocDir { // Tears down previously build directory structure. func (d *AllocDir) Destroy() error { // Unmount all mounted shared alloc dirs. - for _, m := range d.mounted { + for _, m := range d.Mounted { if err := d.unmountSharedDir(m); err != nil { return fmt.Errorf("Failed to unmount shared directory: %v", err) } @@ -233,7 +233,7 @@ func (d *AllocDir) MountSharedDir(task string) error { return fmt.Errorf("Failed to mount shared directory for task %v: %v", task, err) } - d.mounted = append(d.mounted, taskLoc) + d.Mounted = append(d.Mounted, taskLoc) return nil }