diff options
Diffstat (limited to 'drivers/s390/block/dasd_ioctl.c')
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 9396fcacb8f8..fafeeae52675 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -7,8 +7,6 @@ | |||
7 | * Bugreports.to..: <Linux390@de.ibm.com> | 7 | * Bugreports.to..: <Linux390@de.ibm.com> |
8 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 | 8 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 |
9 | * | 9 | * |
10 | * $Revision: 1.50 $ | ||
11 | * | ||
12 | * i/o controls for the dasd driver. | 10 | * i/o controls for the dasd driver. |
13 | */ | 11 | */ |
14 | #include <linux/config.h> | 12 | #include <linux/config.h> |
@@ -423,8 +421,15 @@ dasd_ioctl_information(struct block_device *bdev, int no, long args) | |||
423 | dasd_info->cu_model = cdev->id.cu_model; | 421 | dasd_info->cu_model = cdev->id.cu_model; |
424 | dasd_info->dev_type = cdev->id.dev_type; | 422 | dasd_info->dev_type = cdev->id.dev_type; |
425 | dasd_info->dev_model = cdev->id.dev_model; | 423 | dasd_info->dev_model = cdev->id.dev_model; |
426 | dasd_info->open_count = atomic_read(&device->open_count); | ||
427 | dasd_info->status = device->state; | 424 | dasd_info->status = device->state; |
425 | /* | ||
426 | * The open_count is increased for every opener, that includes | ||
427 | * the blkdev_get in dasd_scan_partitions. | ||
428 | * This must be hidden from user-space. | ||
429 | */ | ||
430 | dasd_info->open_count = atomic_read(&device->open_count); | ||
431 | if (!device->bdev) | ||
432 | dasd_info->open_count++; | ||
428 | 433 | ||
429 | /* | 434 | /* |
430 | * check if device is really formatted | 435 | * check if device is really formatted |