diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-18 08:07:51 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-18 08:07:51 -0800 |
commit | 7f0f598a0069d1ab072375965a4b69137233169c (patch) | |
tree | 00cb9320e0caef179d6075b54fa611de6551e3e2 /drivers | |
parent | a6a0c4ca7edb378a8a7332501f097089cb1051c4 (diff) | |
parent | c26156b2534c75bb3cdedf76f6ad1340971cf5bd (diff) | |
download | linux-3.10-7f0f598a0069d1ab072375965a4b69137233169c.tar.gz linux-3.10-7f0f598a0069d1ab072375965a4b69137233169c.tar.bz2 linux-3.10-7f0f598a0069d1ab072375965a4b69137233169c.zip |
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 b220c686089..2d19f0cc47f 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -338,12 +338,18 @@ wait: static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size) { struct request_queue *rq; + elevator_t *old_e; rq = blk_init_queue(do_blkif_request, &blkif_io_lock); if (rq == NULL) return -1; - elevator_init(rq, "noop"); + old_e = rq->elevator; + if (IS_ERR_VALUE(elevator_init(rq, "noop"))) + printk(KERN_WARNING + "blkfront: Switch elevator failed, use default\n"); + else + elevator_exit(old_e); /* Hard sector size and max sectors impersonate the equiv. hardware. */ blk_queue_hardsect_size(rq, sector_size); |