aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/rd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/rd.c')
-rw-r--r--drivers/block/rd.c4
1 files changed, 2 insertions, 2 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;
}