Commit 57467195 authored by Horst Hummel's avatar Horst Hummel Committed by Linus Torvalds

[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: default avatarHorst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 600b5d16
......@@ -421,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment