diff --git a/runtime/graphdriver/devmapper/driver.go b/runtime/graphdriver/devmapper/driver.go index 1324ddab81..35fe883f26 100644 --- a/runtime/graphdriver/devmapper/driver.go +++ b/runtime/graphdriver/devmapper/driver.go @@ -22,8 +22,7 @@ func init() { type Driver struct { *DeviceSet - home string - MountLabel string + home string } var Init = func(home string) (graphdriver.Driver, error) { @@ -62,12 +61,11 @@ func (d *Driver) Cleanup() error { } func (d *Driver) Create(id, parent string, mountLabel string) error { - d.MountLabel = mountLabel if err := d.DeviceSet.AddDevice(id, parent); err != nil { return err } mp := path.Join(d.home, "mnt", id) - if err := d.mount(id, mp, d.MountLabel); err != nil { + if err := d.mount(id, mp); err != nil { return err } @@ -117,7 +115,7 @@ func (d *Driver) Remove(id string) error { func (d *Driver) Get(id string) (string, error) { mp := path.Join(d.home, "mnt", id) - if err := d.mount(id, mp, d.MountLabel); err != nil { + if err := d.mount(id, mp); err != nil { return "", err } @@ -130,13 +128,13 @@ func (d *Driver) Put(id string) { } } -func (d *Driver) mount(id, mountPoint string, mountLabel string) error { +func (d *Driver) mount(id, mountPoint string) error { // Create the target directories if they don't exist if err := osMkdirAll(mountPoint, 0755); err != nil && !osIsExist(err) { return err } // Mount the device - return d.DeviceSet.MountDevice(id, mountPoint, mountLabel) + return d.DeviceSet.MountDevice(id, mountPoint, "") } func (d *Driver) Exists(id string) bool {