From: Jun'ichi Nomura Date: Mon, 27 Mar 2006 09:18:00 +0000 (-0800) Subject: [PATCH] dm/md dependency tree in sysfs: convert bd_sem to bd_mutex X-Git-Tag: v2.6.17-rc1~299 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b4cf1b72eec0e197257a5b07dc9ec53552cdd123;p=linux-2.6-omap-h63xx.git [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 Cc: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/block_dev.c b/fs/block_dev.c index 3f36df7e037..17c76182f38 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, 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; } @@ -748,11 +748,11 @@ static void bd_release_from_kobject(struct block_device *bdev, 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); } /**