diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-18 11:07:51 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-18 11:07:51 -0500 |
| commit | 7f0f598a0069d1ab072375965a4b69137233169c (patch) | |
| tree | 00cb9320e0caef179d6075b54fa611de6551e3e2 /drivers | |
| parent | a6a0c4ca7edb378a8a7332501f097089cb1051c4 (diff) | |
| parent | c26156b2534c75bb3cdedf76f6ad1340971cf5bd (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: hold extra reference to bio in blk_rq_map_user_iov()
relay: fix cpu offline problem
Release old elevator on change elevator
block: fix boot failure with CONFIG_DEBUG_BLOCK_EXT_DEVT=y and nash
block/md: fix md autodetection
block: make add_partition() return pointer to hd_struct
block: fix add_partition() error path
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/block/xen-blkfront.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index b220c686089d..2d19f0cc47f2 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
| @@ -338,12 +338,18 @@ wait: | |||
| 338 | static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size) | 338 | static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size) |
| 339 | { | 339 | { |
| 340 | struct request_queue *rq; | 340 | struct request_queue *rq; |
| 341 | elevator_t *old_e; | ||
| 341 | 342 | ||
| 342 | rq = blk_init_queue(do_blkif_request, &blkif_io_lock); | 343 | rq = blk_init_queue(do_blkif_request, &blkif_io_lock); |
| 343 | if (rq == NULL) | 344 | if (rq == NULL) |
| 344 | return -1; | 345 | return -1; |
| 345 | 346 | ||
| 346 | elevator_init(rq, "noop"); | 347 | old_e = rq->elevator; |
| 348 | if (IS_ERR_VALUE(elevator_init(rq, "noop"))) | ||
| 349 | printk(KERN_WARNING | ||
| 350 | "blkfront: Switch elevator failed, use default\n"); | ||
| 351 | else | ||
| 352 | elevator_exit(old_e); | ||
| 347 | 353 | ||
| 348 | /* Hard sector size and max sectors impersonate the equiv. hardware. */ | 354 | /* Hard sector size and max sectors impersonate the equiv. hardware. */ |
| 349 | blk_queue_hardsect_size(rq, sector_size); | 355 | blk_queue_hardsect_size(rq, sector_size); |
