Commit b4cf1b72eec0e197257a5b07dc9ec53552cdd123
Committed by
Linus Torvalds
1 parent
f165921df4
Exists in
master
and in
4 other branches
[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>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
fs/block_dev.c
... | ... | @@ -723,11 +723,11 @@ |
723 | 723 | if (!bo) |
724 | 724 | return -ENOMEM; |
725 | 725 | |
726 | - down(&bdev->bd_sem); | |
726 | + mutex_lock(&bdev->bd_mutex); | |
727 | 727 | res = bd_claim(bdev, holder); |
728 | 728 | if (res || !add_bd_holder(bdev, bo)) |
729 | 729 | free_bd_holder(bo); |
730 | - up(&bdev->bd_sem); | |
730 | + mutex_unlock(&bdev->bd_mutex); | |
731 | 731 | |
732 | 732 | return res; |
733 | 733 | } |
734 | 734 | |
... | ... | @@ -748,11 +748,11 @@ |
748 | 748 | if (!kobj) |
749 | 749 | return; |
750 | 750 | |
751 | - down(&bdev->bd_sem); | |
751 | + mutex_lock(&bdev->bd_mutex); | |
752 | 752 | bd_release(bdev); |
753 | 753 | if ((bo = del_bd_holder(bdev, kobj))) |
754 | 754 | free_bd_holder(bo); |
755 | - up(&bdev->bd_sem); | |
755 | + mutex_unlock(&bdev->bd_mutex); | |
756 | 756 | } |
757 | 757 | |
758 | 758 | /** |