diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2005-09-03 15:57:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 00:06:26 -0700 |
commit | c6eb7b7703ac4b3401b74f411c8c51ded214bf19 (patch) | |
tree | 1cb3563cb83f80347dbc3e4bd30c4635d401e87a /drivers/s390/block/dasd_genhd.c | |
parent | 942eaabd5d77522223a311ed9bddaaa3cefde27d (diff) |
[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_genhd.c')
-rw-r--r-- | drivers/s390/block/dasd_genhd.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 96c49349701..a601c9a3354 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c @@ -9,7 +9,7 @@ * * gendisk related functions for the dasd driver. * - * $Revision: 1.50 $ + * $Revision: 1.51 $ */ #include <linux/config.h> @@ -31,16 +31,12 @@ int dasd_gendisk_alloc(struct dasd_device *device) { struct gendisk *gdp; - int len, feature_ro; + int len; /* Make sure the minor for this device exists. */ if (device->devindex >= DASD_PER_MAJOR) return -EBUSY; - feature_ro = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY); - if (feature_ro < 0) - return feature_ro; - gdp = alloc_disk(1 << DASD_PARTN_BITS); if (!gdp) return -ENOMEM; @@ -75,7 +71,7 @@ dasd_gendisk_alloc(struct dasd_device *device) sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id); - if (feature_ro) + if (device->features & DASD_FEATURE_READONLY) set_disk_ro(gdp, 1); gdp->private_data = device; gdp->queue = device->request_queue; |