mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6f87f0deeb
commit
c039e3134a
7 changed files with 38 additions and 38 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue