]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/block/aoe/aoeblk.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[mv-sheeva.git] / drivers / block / aoe / aoeblk.c
index 035cefe4045ae76f076f3d56a85b058c3bb68fc7..a946929735a5818e525c14e97b9011913f9e54f9 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/slab.h>
 #include <linux/genhd.h>
 #include <linux/netdevice.h>
+#include <linux/smp_lock.h>
 #include "aoe.h"
 
 static struct kmem_cache *buf_pool_cache;
@@ -124,13 +125,16 @@ aoeblk_open(struct block_device *bdev, fmode_t mode)
        struct aoedev *d = bdev->bd_disk->private_data;
        ulong flags;
 
+       lock_kernel();
        spin_lock_irqsave(&d->lock, flags);
        if (d->flags & DEVFL_UP) {
                d->nopen++;
                spin_unlock_irqrestore(&d->lock, flags);
+               unlock_kernel();
                return 0;
        }
        spin_unlock_irqrestore(&d->lock, flags);
+       unlock_kernel();
        return -ENODEV;
 }
 
@@ -173,7 +177,7 @@ 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)) {
+       } else if (bio->bi_rw & REQ_HARDBARRIER) {
                bio_endio(bio, -EOPNOTSUPP);
                return 0;
        } else if (bio->bi_io_vec == NULL) {