diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/nbd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 0766ce6187a9..7bcc1d8bc967 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -722,7 +722,6 @@ static int __init nbd_init(void) | |||
722 | 722 | ||
723 | for (i = 0; i < nbds_max; i++) { | 723 | for (i = 0; i < nbds_max; i++) { |
724 | struct gendisk *disk = alloc_disk(1 << part_shift); | 724 | struct gendisk *disk = alloc_disk(1 << part_shift); |
725 | struct elevator_queue *old_e; | ||
726 | if (!disk) | 725 | if (!disk) |
727 | goto out; | 726 | goto out; |
728 | nbd_dev[i].disk = disk; | 727 | nbd_dev[i].disk = disk; |
@@ -736,11 +735,10 @@ static int __init nbd_init(void) | |||
736 | put_disk(disk); | 735 | put_disk(disk); |
737 | goto out; | 736 | goto out; |
738 | } | 737 | } |
739 | old_e = disk->queue->elevator; | 738 | /* |
740 | if (elevator_init(disk->queue, "deadline") == 0 || | 739 | * Tell the block layer that we are not a rotational device |
741 | elevator_init(disk->queue, "noop") == 0) { | 740 | */ |
742 | elevator_exit(old_e); | 741 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, disk->queue); |
743 | } | ||
744 | } | 742 | } |
745 | 743 | ||
746 | if (register_blkdev(NBD_MAJOR, "nbd")) { | 744 | if (register_blkdev(NBD_MAJOR, "nbd")) { |