linux/drivers/s390/block
Jan Höppner 795c9a5106 s390/dasd: Fix faulty ENODEV for RO sysfs attribute
If a device is offline it can still be set to read-only via the bus id
through sysfs. Only the read-only feature flag for the ccw_device is
then set. If the device is online the corresponding block device needs
to be set to read-only as well (via set_disk_ro()).
The check whether there is a device to do so, however, happens after the
feature flag was set. This leads to an unnecessary "no such device"
error in the offline case.

This bug was introduced by commit 7571cb1c8e3cc ("s390/dasd: Make use of
dasd_set_feature() more often"). Fix this by simply returning count if
no device is available.

Fixes: 7571cb1c8e3cc ("s390/dasd: Make use of dasd_set_feature() more often")
Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-06-28 07:32:15 +02:00
..
dasd_3990_erp.c s390/dasd: suppress command reject error for query host access command 2017-03-28 16:54:28 +02:00
dasd_alias.c s390/dasd: reorder lcu and device lock 2016-03-17 13:18:25 +01:00
dasd_devmap.c s390/dasd: Fix faulty ENODEV for RO sysfs attribute 2017-06-28 07:32:15 +02:00
dasd_diag.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-03-16 10:47:45 -07:00
dasd_diag.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
dasd_eckd.c s390/dasd: suppress command reject error for query host access command 2017-03-28 16:54:28 +02:00
dasd_eckd.h s390/dasd: channel path aware error recovery 2016-12-12 12:05:03 +01:00
dasd_eer.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
dasd_erp.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
dasd_fba.c s390/dasd: extend dasd path handling 2016-12-12 12:04:37 +01:00
dasd_fba.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
dasd_genhd.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
dasd_int.h s390/dasd: suppress command reject error for query host access command 2017-03-28 16:54:28 +02:00
dasd_ioctl.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
dasd_proc.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
dasd.c s390/dasd: fix hanging safe offline 2017-06-12 16:26:01 +02:00
dcssblk.c block: remove block_device_operations ->direct_access() 2017-04-25 13:20:46 -07:00
Kconfig s390/scm: remove cluster option 2017-06-12 16:25:55 +02:00
Makefile s390/scm: remove cluster option 2017-06-12 16:25:55 +02:00
scm_blk.c s390/scm: use multiple queues 2017-06-12 16:25:56 +02:00
scm_blk.h s390/scm: use multiple queues 2017-06-12 16:25:56 +02:00
scm_drv.c s390/scm_block: fix printk format string 2013-03-21 13:35:37 +01:00
xpram.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00