The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] block_dev.c mutex_lock_nested() fix
@ 2006-08-23 15:09 Jason Baron
  2006-08-23 16:48 ` Peter Zijlstra
  2006-08-23 18:02 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Jason Baron @ 2006-08-23 15:09 UTC (permalink / raw)
  To: neilb; +Cc: akpm, arjan, mingo, axboe, a.p.zijlstra, linux-kernel


Hi,

In the case below we are locking the whole disk not a partition. This 
change simply brings the code in line with the piece above where when we 
are the 'first' opener, and we are a partition.

thanks,

-Jason

Signed-off-by: Jason Baron <jbaron@redhat.com>

--- linux-2.6/fs/block_dev.c.bak
+++ linux-2.6/fs/block_dev.c
@@ -966,7 +966,7 @@ do_open(struct block_device *bdev, struc
 				rescan_partitions(bdev->bd_disk, bdev);
 		} else {
 			mutex_lock_nested(&bdev->bd_contains->bd_mutex,
-					  BD_MUTEX_PARTITION);
+					  BD_MUTEX_WHOLE);
 			bdev->bd_contains->bd_part_count++;
 			mutex_unlock(&bdev->bd_contains->bd_mutex);
 		}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-23 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-23 15:09 [PATCH] block_dev.c mutex_lock_nested() fix Jason Baron
2006-08-23 16:48 ` Peter Zijlstra
2006-08-23 18:02 ` Andrew Morton
2006-08-23 17:51   ` Jason Baron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox