diff options
Diffstat (limited to 'drivers/s390/block/dcssblk.c')
-rw-r--r-- | drivers/s390/block/dcssblk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 01fcdd91b846..711b3004b3e6 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -384,6 +384,11 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char | |||
384 | * get minor, add to list | 384 | * get minor, add to list |
385 | */ | 385 | */ |
386 | down_write(&dcssblk_devices_sem); | 386 | down_write(&dcssblk_devices_sem); |
387 | if (dcssblk_get_device_by_name(local_buf)) { | ||
388 | up_write(&dcssblk_devices_sem); | ||
389 | rc = -EEXIST; | ||
390 | goto unload_seg; | ||
391 | } | ||
387 | rc = dcssblk_assign_free_minor(dev_info); | 392 | rc = dcssblk_assign_free_minor(dev_info); |
388 | if (rc) { | 393 | if (rc) { |
389 | up_write(&dcssblk_devices_sem); | 394 | up_write(&dcssblk_devices_sem); |