lkml.org 
[lkml]   [2006]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 7/7] dm/md dependency tree in sysfs: convert bd_sem to bd_mutex
This patch is part of dm/md dependency tree in sysfs.

This patch follows the change introduced by
sem2mutex-blockdev-2.patch in 2.6.16-rc6-mm1.

Thanks,
--
Jun'ichi Nomura, NEC Solutions (America), Inc.
Convert bd_sem to bd_mutex

Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>

block_dev.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

--- linux-2.6.16-rc6-mm1.orig/fs/block_dev.c.orig-mm1 2006-03-13 14:04:32.000000000 -0500
+++ linux-2.6.16-rc6-mm1/fs/block_dev.c 2006-03-13 12:29:35.000000000 -0500
@@ -674,11 +674,11 @@ int bd_claim_by_kobject(struct block_dev
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;
}
@@ -692,11 +692,11 @@ void bd_release_from_kobject(struct bloc
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);
}

EXPORT_SYMBOL(bd_release_from_kobject);
\
 
 \ /
  Last update: 2006-03-13 23:19    [W:0.121 / U:0.120 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site