include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[pandora-kernel.git] / drivers / block / aoe / aoeblk.c
index 1e15889..035cefe 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/backing-dev.h>
 #include <linux/fs.h>
 #include <linux/ioctl.h>
+#include <linux/slab.h>
 #include <linux/genhd.h>
 #include <linux/netdevice.h>
 #include "aoe.h"
@@ -172,6 +173,9 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio)
                BUG();
                bio_endio(bio, -ENXIO);
                return 0;
+       } else if (bio_rw_flagged(bio, BIO_RW_BARRIER)) {
+               bio_endio(bio, -EOPNOTSUPP);
+               return 0;
        } else if (bio->bi_io_vec == NULL) {
                printk(KERN_ERR "aoe: bi_io_vec is NULL\n");
                BUG();
@@ -234,7 +238,7 @@ aoeblk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
        return 0;
 }
 
-static struct block_device_operations aoe_bdops = {
+static const struct block_device_operations aoe_bdops = {
        .open = aoeblk_open,
        .release = aoeblk_release,
        .getgeo = aoeblk_getgeo,
@@ -268,6 +272,7 @@ aoeblk_gdalloc(void *vp)
        if (!d->blkq)
                goto err_mempool;
        blk_queue_make_request(d->blkq, aoeblk_make_request);
+       d->blkq->backing_dev_info.name = "aoe";
        if (bdi_init(&d->blkq->backing_dev_info))
                goto err_blkq;
        spin_lock_irqsave(&d->lock, flags);