From: Jason Baron 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. Signed-off-by: Jason Baron Acked-by: Peter Zijlstra Signed-off-by: Andrew Morton --- fs/block_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/block_dev.c~block_devc-mutex_lock_nested-fix fs/block_dev.c --- a/fs/block_dev.c~block_devc-mutex_lock_nested-fix +++ a/fs/block_dev.c @@ -1037,7 +1037,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); } _