diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2005-09-04 02:57:58 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 11:06:26 +0400 |
commit | c6eb7b7703ac4b3401b74f411c8c51ded214bf19 (patch) | |
tree | 1cb3563cb83f80347dbc3e4bd30c4635d401e87a /drivers/s390/block/dasd_devmap.c | |
parent | 942eaabd5d77522223a311ed9bddaaa3cefde27d (diff) | |
download | linux-c6eb7b7703ac4b3401b74f411c8c51ded214bf19.tar.xz |
[PATCH] s390: deadlock in dasd_devmap
Reintroduce a read-only copy of the devmap features in the device struct.
This is necessary to solve a deadlock on the dasd_devmap_lock which is
acquired by dasd_get_features called from the dasd tasklet. The current
implementation of devmap doesn't allow to call any devmap function from
interrupt or softirq context.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/block/dasd_devmap.c')
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index d948566bb24a..bda896d9d788 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c @@ -11,7 +11,7 @@ * functions may not be called from interrupt context. In particular * dasd_get_device is a no-no from interrupt context. * - * $Revision: 1.40 $ + * $Revision: 1.43 $ */ #include <linux/config.h> @@ -513,6 +513,7 @@ dasd_create_device(struct ccw_device *cdev) if (!devmap->device) { devmap->device = device; device->devindex = devmap->devindex; + device->features = devmap->features; get_device(&cdev->dev); device->cdev = cdev; rc = 0; @@ -643,6 +644,8 @@ dasd_ro_store(struct device *dev, struct device_attribute *attr, const char *buf devmap->features |= DASD_FEATURE_READONLY; else devmap->features &= ~DASD_FEATURE_READONLY; + if (devmap->device) + devmap->device->features = devmap->features; if (devmap->device && devmap->device->gdp) set_disk_ro(devmap->device->gdp, ro_flag); spin_unlock(&dasd_devmap_lock); @@ -758,7 +761,8 @@ dasd_set_feature(struct ccw_device *cdev, int feature, int flag) devmap->features |= feature; else devmap->features &= ~feature; - + if (devmap->device) + devmap->device->features = devmap->features; spin_unlock(&dasd_devmap_lock); return 0; } |