Skip to content

Commit

Permalink
[PATCH] dm/md dependency tree in sysfs: convert bd_sem to bd_mutex
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jun'ichi Nomura authored and Linus Torvalds committed Mar 27, 2006
1 parent f165921 commit b4cf1b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit b4cf1b7

Please sign in to comment.