diff options
-rw-r--r-- | drivers/block/aoe/aoe.h | 2 | ||||
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 12 | ||||
-rw-r--r-- | drivers/block/aoe/aoedev.c | 1 |
3 files changed, 11 insertions, 4 deletions
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 5e41e6dd657b..db195abad698 100644 --- a/drivers/block/aoe/aoe.h +++ b/drivers/block/aoe/aoe.h | |||
@@ -155,7 +155,7 @@ struct aoedev { | |||
155 | u16 fw_ver; /* version of blade's firmware */ | 155 | u16 fw_ver; /* version of blade's firmware */ |
156 | struct work_struct work;/* disk create work struct */ | 156 | struct work_struct work;/* disk create work struct */ |
157 | struct gendisk *gd; | 157 | struct gendisk *gd; |
158 | struct request_queue blkq; | 158 | struct request_queue *blkq; |
159 | struct hd_geometry geo; | 159 | struct hd_geometry geo; |
160 | sector_t ssize; | 160 | sector_t ssize; |
161 | struct timer_list timer; | 161 | struct timer_list timer; |
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 2307a271bdc9..1e15889c4b98 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -264,9 +264,12 @@ aoeblk_gdalloc(void *vp) | |||
264 | goto err_disk; | 264 | goto err_disk; |
265 | } | 265 | } |
266 | 266 | ||
267 | blk_queue_make_request(&d->blkq, aoeblk_make_request); | 267 | d->blkq = blk_alloc_queue(GFP_KERNEL); |
268 | if (bdi_init(&d->blkq.backing_dev_info)) | 268 | if (!d->blkq) |
269 | goto err_mempool; | 269 | goto err_mempool; |
270 | blk_queue_make_request(d->blkq, aoeblk_make_request); | ||
271 | if (bdi_init(&d->blkq->backing_dev_info)) | ||
272 | goto err_blkq; | ||
270 | spin_lock_irqsave(&d->lock, flags); | 273 | spin_lock_irqsave(&d->lock, flags); |
271 | gd->major = AOE_MAJOR; | 274 | gd->major = AOE_MAJOR; |
272 | gd->first_minor = d->sysminor * AOE_PARTITIONS; | 275 | gd->first_minor = d->sysminor * AOE_PARTITIONS; |
@@ -276,7 +279,7 @@ aoeblk_gdalloc(void *vp) | |||
276 | snprintf(gd->disk_name, sizeof gd->disk_name, "etherd/e%ld.%d", | 279 | snprintf(gd->disk_name, sizeof gd->disk_name, "etherd/e%ld.%d", |
277 | d->aoemajor, d->aoeminor); | 280 | d->aoemajor, d->aoeminor); |
278 | 281 | ||
279 | gd->queue = &d->blkq; | 282 | gd->queue = d->blkq; |
280 | d->gd = gd; | 283 | d->gd = gd; |
281 | d->flags &= ~DEVFL_GDALLOC; | 284 | d->flags &= ~DEVFL_GDALLOC; |
282 | d->flags |= DEVFL_UP; | 285 | d->flags |= DEVFL_UP; |
@@ -287,6 +290,9 @@ aoeblk_gdalloc(void *vp) | |||
287 | aoedisk_add_sysfs(d); | 290 | aoedisk_add_sysfs(d); |
288 | return; | 291 | return; |
289 | 292 | ||
293 | err_blkq: | ||
294 | blk_cleanup_queue(d->blkq); | ||
295 | d->blkq = NULL; | ||
290 | err_mempool: | 296 | err_mempool: |
291 | mempool_destroy(d->bufpool); | 297 | mempool_destroy(d->bufpool); |
292 | err_disk: | 298 | err_disk: |
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index eeea477d9601..fa67027789aa 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c | |||
@@ -113,6 +113,7 @@ aoedev_freedev(struct aoedev *d) | |||
113 | if (d->bufpool) | 113 | if (d->bufpool) |
114 | mempool_destroy(d->bufpool); | 114 | mempool_destroy(d->bufpool); |
115 | skbpoolfree(d); | 115 | skbpoolfree(d); |
116 | blk_cleanup_queue(d->blkq); | ||
116 | kfree(d); | 117 | kfree(d); |
117 | } | 118 | } |
118 | 119 | ||