diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/block_dev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 3f36df7e037c..17c76182f389 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -723,11 +723,11 @@ static int bd_claim_by_kobject(struct block_device *bdev, void *holder, | |||
723 | if (!bo) | 723 | if (!bo) |
724 | return -ENOMEM; | 724 | return -ENOMEM; |
725 | 725 | ||
726 | down(&bdev->bd_sem); | 726 | mutex_lock(&bdev->bd_mutex); |
727 | res = bd_claim(bdev, holder); | 727 | res = bd_claim(bdev, holder); |
728 | if (res || !add_bd_holder(bdev, bo)) | 728 | if (res || !add_bd_holder(bdev, bo)) |
729 | free_bd_holder(bo); | 729 | free_bd_holder(bo); |
730 | up(&bdev->bd_sem); | 730 | mutex_unlock(&bdev->bd_mutex); |
731 | 731 | ||
732 | return res; | 732 | return res; |
733 | } | 733 | } |
@@ -748,11 +748,11 @@ static void bd_release_from_kobject(struct block_device *bdev, | |||
748 | if (!kobj) | 748 | if (!kobj) |
749 | return; | 749 | return; |
750 | 750 | ||
751 | down(&bdev->bd_sem); | 751 | mutex_lock(&bdev->bd_mutex); |
752 | bd_release(bdev); | 752 | bd_release(bdev); |
753 | if ((bo = del_bd_holder(bdev, kobj))) | 753 | if ((bo = del_bd_holder(bdev, kobj))) |
754 | free_bd_holder(bo); | 754 | free_bd_holder(bo); |
755 | up(&bdev->bd_sem); | 755 | mutex_unlock(&bdev->bd_mutex); |
756 | } | 756 | } |
757 | 757 | ||
758 | /** | 758 | /** |