aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2007-01-11 02:15:41 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-11 21:18:21 -0500
commitf73ca1b76c6880b934d3ef566c1592efc80bb759 (patch)
treec9384ef5ff0ba68817858afdcc330e8707b11ec9 /fs/block_dev.c
parent88bf7b391dca840f03fe25e4ff8fe6b4319fa07b (diff)
[PATCH] Revert bd_mount_mutex back to a semaphore
Revert bd_mount_mutex back to a semaphore so that xfs_freeze -f /mnt/newtest; xfs_freeze -u /mnt/newtest works safely and doesn't produce lockdep warnings. (XFS unlocks the semaphore from a different task, by design. The mutex code warns about this) Signed-off-by: Dave Chinner <dgc@sgi.com> Cc: Ingo Molnar <mingo@elte.hu> 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 1715d6b5f411..8b18e43b82fe 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -411,7 +411,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
411 { 411 {
412 memset(bdev, 0, sizeof(*bdev)); 412 memset(bdev, 0, sizeof(*bdev));
413 mutex_init(&bdev->bd_mutex); 413 mutex_init(&bdev->bd_mutex);
414 mutex_init(&bdev->bd_mount_mutex); 414 sema_init(&bdev->bd_mount_sem, 1);
415 INIT_LIST_HEAD(&bdev->bd_inodes); 415 INIT_LIST_HEAD(&bdev->bd_inodes);
416 INIT_LIST_HEAD(&bdev->bd_list); 416 INIT_LIST_HEAD(&bdev->bd_list);
417#ifdef CONFIG_SYSFS 417#ifdef CONFIG_SYSFS