From f6a8436504d51b96649ead96d886097657a79fa4 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 24 Jul 2017 10:20:39 +0200 Subject: [PATCH] Fixed glusterfs mount options Capacity of a slice is the third argument, not the second one. We use append() to fill the slice, so it should be empty at the beginning and with the right capacity. --- pkg/volume/glusterfs/glusterfs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index 092804e296f..92b9b09eabc 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -353,7 +353,7 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error { // Give a try without `auto_unmount` mount option, because // it could be that gluster fuse client is older version and // mount.glusterfs is unaware of `auto_unmount`. - noAutoMountOptions := make([]string, len(mountOptions)) + noAutoMountOptions := make([]string, 0, len(mountOptions)) for _, opt := range mountOptions { if opt != "auto_unmount" { noAutoMountOptions = append(noAutoMountOptions, opt)