aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHorst Hummel <horst.hummel@de.ibm.com>2006-02-01 06:06:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:24 -0500
commit57467195d1581e354998d5cc35dfd7a12d6e0a24 (patch)
tree6b8db246cc3856a15d30ade8e057e069cef34927 /drivers
parent600b5d163d7434332539cac7be00f649cbbfedcc (diff)
[PATCH] s390: dasd open counter
The open_count is increased for every opener, that includes the blkdev_get in dasd_scan_partitions. This tampers the open_count in BIODASDINFO. Hide the internal open from user-space. Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@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')
-rw-r--r--drivers/s390/block/dasd_ioctl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index 74ed5f4dd5e0..fafeeae52675 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -421,8 +421,15 @@ dasd_ioctl_information(struct block_device *bdev, int no, long args)
421 dasd_info->cu_model = cdev->id.cu_model; 421 dasd_info->cu_model = cdev->id.cu_model;
422 dasd_info->dev_type = cdev->id.dev_type; 422 dasd_info->dev_type = cdev->id.dev_type;
423 dasd_info->dev_model = cdev->id.dev_model; 423 dasd_info->dev_model = cdev->id.dev_model;
424 dasd_info->open_count = atomic_read(&device->open_count);
425 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++;
426 433
427 /* 434 /*
428 * check if device is really formatted 435 * check if device is really formatted