aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorJun'ichi Nomura <j-nomura@ce.jp.nec.com>2006-03-27 04:18:00 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:45:00 -0500
commitb4cf1b72eec0e197257a5b07dc9ec53552cdd123 (patch)
tree5e292f1877ceaccb8d44683a5885078c0b101168 /fs/block_dev.c
parentf165921df46a977e3561f1bd9f13a348441486d1 (diff)
[PATCH] dm/md dependency tree in sysfs: convert bd_sem to bd_mutex
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>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c8
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/**