Commit 0c3812c3 authored by Vineeth Vijayan's avatar Vineeth Vijayan Committed by Vasily Gorbik

s390/cio: derive cdev information only for IO-subchannels

cdev->online for the purge function must not be checked for the
non-IO subchannel type. Make sure that we are deriving the cdev only
from sch-type SUBCHANNEL_TYPE_IO.
Signed-off-by: default avatarVineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 6526a597
...@@ -792,10 +792,13 @@ static int __unset_online(struct device *dev, void *data) ...@@ -792,10 +792,13 @@ static int __unset_online(struct device *dev, void *data)
{ {
struct idset *set = data; struct idset *set = data;
struct subchannel *sch = to_subchannel(dev); struct subchannel *sch = to_subchannel(dev);
struct ccw_device *cdev = sch_get_cdev(sch); struct ccw_device *cdev;
if (cdev && cdev->online) if (sch->st == SUBCHANNEL_TYPE_IO) {
idset_sch_del(set, sch->schid); cdev = sch_get_cdev(sch);
if (cdev && cdev->online)
idset_sch_del(set, sch->schid);
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment