s390/dasd: allow 0 for path_threshold attribute
authorStefan Haberland <sth@linux.vnet.ibm.com>
Wed, 25 Jan 2017 13:08:20 +0000 (14:08 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 31 Jan 2017 09:47:08 +0000 (10:47 +0100)
Allow 0 as valid input for the path_threshold attribute to deactivate
the IFCC/CCC error handling.

Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_devmap.c

index 041bdc4429c16b50a97683bb43038cc16a3630ac..1164b51d09f3b942bf6c04d3b233e79e08fc2259 100644 (file)
@@ -1518,14 +1518,12 @@ dasd_path_threshold_store(struct device *dev, struct device_attribute *attr,
        if (IS_ERR(device))
                return -ENODEV;
 
-       if ((kstrtoul(buf, 10, &val) != 0) ||
-           (val > DASD_THRHLD_MAX) || val == 0) {
+       if (kstrtoul(buf, 10, &val) != 0 || val > DASD_THRHLD_MAX) {
                dasd_put_device(device);
                return -EINVAL;
        }
        spin_lock_irqsave(get_ccwdev_lock(to_ccwdev(dev)), flags);
-       if (val)
-               device->path_thrhld = val;
+       device->path_thrhld = val;
        spin_unlock_irqrestore(get_ccwdev_lock(to_ccwdev(dev)), flags);
        dasd_put_device(device);
        return count;