diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2006-03-07 21:55:39 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-08 14:14:01 -0800 |
commit | 90f0094dc607abe384a412bfb7199fb667ab0735 (patch) | |
tree | 2cd4c048a95d49a532bd237388f2b50ceb55ceb6 /drivers/s390/block/dasd_genhd.c | |
parent | fbcae7eafcf7dfb315602de935d7ca85574e5c11 (diff) | |
download | kernel-common-90f0094dc607abe384a412bfb7199fb667ab0735.tar.gz kernel-common-90f0094dc607abe384a412bfb7199fb667ab0735.tar.bz2 kernel-common-90f0094dc607abe384a412bfb7199fb667ab0735.zip |
[PATCH] s390: dasd partition detection
DASD allows to open a device as soon as gendisk is registered, which means the
device is a fake device (capacity=0) and we do know nothing about blocksize
and partitions at that point of time. In case the device is opened by
someone, the bdev and inode creation is done with the fake device info and the
following partition detection code is just using the wrong data.
To avoid this modify the DASD state machine to make sure that the open is
rejected until the device analysis is either finished or an unformatted device
was detected.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@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 | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 65dc844b975c..fce2835e7d19 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c @@ -100,8 +100,6 @@ dasd_scan_partitions(struct dasd_device * device) { struct block_device *bdev; - /* Make the disk known. */ - set_capacity(device->gdp, device->blocks << device->s2b_shift); bdev = bdget_disk(device->gdp, 0); if (!bdev || blkdev_get(bdev, FMODE_READ, 1) < 0) return -ENODEV; |