Convert bd_sem to bd_mutex
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
if (!bo)
return -ENOMEM;
- down(&bdev->bd_sem);
+ mutex_lock(&bdev->bd_mutex);
res = bd_claim(bdev, holder);
if (res || !add_bd_holder(bdev, bo))
free_bd_holder(bo);
- up(&bdev->bd_sem);
+ mutex_unlock(&bdev->bd_mutex);
return res;
}
if (!kobj)
return;
- down(&bdev->bd_sem);
+ mutex_lock(&bdev->bd_mutex);
bd_release(bdev);
if ((bo = del_bd_holder(bdev, kobj)))
free_bd_holder(bo);
- up(&bdev->bd_sem);
+ mutex_unlock(&bdev->bd_mutex);
}
/**