Add error check after parseStorageOpt

Signed-off-by: Ken Herner <kherner@progress.com>
Upstream-commit: 373654f43e87a2e0bd5388ca4ab1852fd51a7199
Component: engine
This commit is contained in:
Ken Herner
2016-05-12 17:21:38 -04:00
parent 11d44b0dc0
commit 74bbceaf49

View File

@ -275,6 +275,9 @@ func (d *Driver) Create(id string, parent string, mountLabel string, storageOpt
func (d *Driver) create(id, parent string, storageOpt map[string]string) error {
name := d.zfsPath(id)
quota, err := parseStorageOpt(storageOpt)
if err != nil {
return err
}
if parent == "" {
mountoptions := map[string]string{"mountpoint": "legacy"}
fs, err := zfs.CreateFilesystem(name, mountoptions)