diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rd.c b/drivers/block/rd.c index ffd6abd6d5a0..1c54f46d3f70 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, | |||
310 | * cache | 310 | * cache |
311 | */ | 311 | */ |
312 | error = -EBUSY; | 312 | error = -EBUSY; |
313 | down(&bdev->bd_sem); | 313 | mutex_lock(&bdev->bd_mutex); |
314 | if (bdev->bd_openers <= 2) { | 314 | if (bdev->bd_openers <= 2) { |
315 | truncate_inode_pages(bdev->bd_inode->i_mapping, 0); | 315 | truncate_inode_pages(bdev->bd_inode->i_mapping, 0); |
316 | error = 0; | 316 | error = 0; |
317 | } | 317 | } |
318 | up(&bdev->bd_sem); | 318 | mutex_unlock(&bdev->bd_mutex); |
319 | return error; | 319 | return error; |
320 | } | 320 | } |
321 | 321 | ||