Browse Source

s390/dasd: allow 0 for path_threshold attribute

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>
Stefan Haberland 8 years ago
parent
commit
defc2a9b98
1 changed files with 2 additions and 4 deletions
  1. 2 4
      drivers/s390/block/dasd_devmap.c

+ 2 - 4
drivers/s390/block/dasd_devmap.c

@@ -1518,14 +1518,12 @@ dasd_path_threshold_store(struct device *dev, struct device_attribute *attr,
 	if (IS_ERR(device))
 	if (IS_ERR(device))
 		return -ENODEV;
 		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);
 		dasd_put_device(device);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	spin_lock_irqsave(get_ccwdev_lock(to_ccwdev(dev)), flags);
 	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);
 	spin_unlock_irqrestore(get_ccwdev_lock(to_ccwdev(dev)), flags);
 	dasd_put_device(device);
 	dasd_put_device(device);
 	return count;
 	return count;