aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/genhd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 666e11b83983..ea982eadaf63 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -422,9 +422,9 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)
422 /* allocate ext devt */ 422 /* allocate ext devt */
423 idr_preload(GFP_KERNEL); 423 idr_preload(GFP_KERNEL);
424 424
425 spin_lock(&ext_devt_lock); 425 spin_lock_bh(&ext_devt_lock);
426 idx = idr_alloc(&ext_devt_idr, part, 0, NR_EXT_DEVT, GFP_NOWAIT); 426 idx = idr_alloc(&ext_devt_idr, part, 0, NR_EXT_DEVT, GFP_NOWAIT);
427 spin_unlock(&ext_devt_lock); 427 spin_unlock_bh(&ext_devt_lock);
428 428
429 idr_preload_end(); 429 idr_preload_end();
430 if (idx < 0) 430 if (idx < 0)
@@ -449,9 +449,9 @@ void blk_free_devt(dev_t devt)
449 return; 449 return;
450 450
451 if (MAJOR(devt) == BLOCK_EXT_MAJOR) { 451 if (MAJOR(devt) == BLOCK_EXT_MAJOR) {
452 spin_lock(&ext_devt_lock); 452 spin_lock_bh(&ext_devt_lock);
453 idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt))); 453 idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
454 spin_unlock(&ext_devt_lock); 454 spin_unlock_bh(&ext_devt_lock);
455 } 455 }
456} 456}
457 457
@@ -690,13 +690,13 @@ struct gendisk *get_gendisk(dev_t devt, int *partno)
690 } else { 690 } else {
691 struct hd_struct *part; 691 struct hd_struct *part;
692 692
693 spin_lock(&ext_devt_lock); 693 spin_lock_bh(&ext_devt_lock);
694 part = idr_find(&ext_devt_idr, blk_mangle_minor(MINOR(devt))); 694 part = idr_find(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
695 if (part && get_disk(part_to_disk(part))) { 695 if (part && get_disk(part_to_disk(part))) {
696 *partno = part->partno; 696 *partno = part->partno;
697 disk = part_to_disk(part); 697 disk = part_to_disk(part);
698 } 698 }
699 spin_unlock(&ext_devt_lock); 699 spin_unlock_bh(&ext_devt_lock);
700 } 700 }
701 701
702 return disk; 702 return disk;