diff options
author | Paul Mackerras <paulus@samba.org> | 2006-02-08 09:43:08 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-08 09:43:08 +1100 |
commit | 8f75015f33c3005e0bbf83ffc0d5e0b4262cc03d (patch) | |
tree | a3c34ad86ccdc904bb43af6cd1cb163231c29276 /drivers/s390/block/dasd_ioctl.c | |
parent | 076d022c566fddde41fd4a858dd24bacad8304d7 (diff) | |
parent | e060e084e7d9e1c62d02cb6b8d3fe07db5317eaa (diff) | |
download | op-kernel-dev-8f75015f33c3005e0bbf83ffc0d5e0b4262cc03d.zip op-kernel-dev-8f75015f33c3005e0bbf83ffc0d5e0b4262cc03d.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
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 9396fca..fafeeae 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c @@ -7,8 +7,6 @@ * Bugreports.to..: <Linux390@de.ibm.com> * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * - * $Revision: 1.50 $ - * * i/o controls for the dasd driver. */ #include <linux/config.h> @@ -423,8 +421,15 @@ dasd_ioctl_information(struct block_device *bdev, int no, long args) dasd_info->cu_model = cdev->id.cu_model; dasd_info->dev_type = cdev->id.dev_type; dasd_info->dev_model = cdev->id.dev_model; - dasd_info->open_count = atomic_read(&device->open_count); dasd_info->status = device->state; + /* + * The open_count is increased for every opener, that includes + * the blkdev_get in dasd_scan_partitions. + * This must be hidden from user-space. + */ + dasd_info->open_count = atomic_read(&device->open_count); + if (!device->bdev) + dasd_info->open_count++; /* * check if device is really formatted |