Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit defc2a9b authored by Stefan Haberland's avatar Stefan Haberland Committed by Martin Schwidefsky
Browse files

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: default avatarStefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 34525e1f
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1518,13 +1518,11 @@ 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;
	spin_unlock_irqrestore(get_ccwdev_lock(to_ccwdev(dev)), flags);
	dasd_put_device(device);