aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-03-23 03:00:28 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 07:38:11 -0800
commitc039e3134ae62863bbc8e8429b29e3c43cf21b2a (patch)
treeb9bbf4fda0844e3173bf10a5bffbaaec94fb4246 /drivers
parent6f87f0deebaff2716a3ce9232f948d702690562a (diff)
[PATCH] sem2mutex: blockdev #2
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rd.c4
-rw-r--r--drivers/s390/block/dasd_ioctl.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/rd.c b/drivers/block/rd.c
index ffd6abd6d5a..1c54f46d3f7 100644
--- a/drivers/block/rd.c
+++ b/drivers/block/rd.c
@@ -310,12 +310,12 @@ static int rd_ioctl(struct inode *inode, struct file *file,
* cache
*/
error = -EBUSY;
- down(&bdev->bd_sem);
+ mutex_lock(&bdev->bd_mutex);
if (bdev->bd_openers <= 2) {
truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
error = 0;
}
- up(&bdev->bd_sem);
+ mutex_unlock(&bdev->bd_mutex);
return error;
}
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index fafeeae5267..f9930552ab5 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -151,9 +151,9 @@ dasd_ioctl_enable(struct block_device *bdev, int no, long args)
return -ENODEV;
dasd_enable_device(device);
/* Formatting the dasd device can change the capacity. */
- down(&bdev->bd_sem);
+ mutex_lock(&bdev->bd_mutex);
i_size_write(bdev->bd_inode, (loff_t)get_capacity(device->gdp) << 9);
- up(&bdev->bd_sem);
+ mutex_unlock(&bdev->bd_mutex);
return 0;
}
@@ -184,9 +184,9 @@ dasd_ioctl_disable(struct block_device *bdev, int no, long args)
* Set i_size to zero, since read, write, etc. check against this
* value.
*/
- down(&bdev->bd_sem);
+ mutex_lock(&bdev->bd_mutex);
i_size_write(bdev->bd_inode, 0);
- up(&bdev->bd_sem);
+ mutex_unlock(&bdev->bd_mutex);
return 0;
}