diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:22:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 18:22:42 -0400 |
commit | 2f9e825d3e0e2b407ae8f082de5c00afcf7378fb (patch) | |
tree | f8b3ee40674ce4acd5508a0a0bf52a30904caf6c /drivers/block/aoe/aoeblk.c | |
parent | 7ae0dea900b027cd90e8a3e14deca9a19e17638b (diff) | |
parent | de75d60d5ea235e6e09f4962ab22541ce0fe176a (diff) |
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits)
block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n
xen-blkfront: fix missing out label
blkdev: fix blkdev_issue_zeroout return value
block: update request stacking methods to support discards
block: fix missing export of blk_types.h
writeback: fix bad _bh spinlock nesting
drbd: revert "delay probes", feature is being re-implemented differently
drbd: Initialize all members of sync_conf to their defaults [Bugz 315]
drbd: Disable delay probes for the upcomming release
writeback: cleanup bdi_register
writeback: add new tracepoints
writeback: remove unnecessary init_timer call
writeback: optimize periodic bdi thread wakeups
writeback: prevent unnecessary bdi threads wakeups
writeback: move bdi threads exiting logic to the forker thread
writeback: restructure bdi forker loop a little
writeback: move last_active to bdi
writeback: do not remove bdi from bdi_list
writeback: simplify bdi code a little
writeback: do not lose wake-ups in bdi threads
...
Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and
drivers/scsi/scsi_error.c as per Jens.
Diffstat (limited to 'drivers/block/aoe/aoeblk.c')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 035cefe4045a..a946929735a5 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/genhd.h> | 13 | #include <linux/genhd.h> |
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/smp_lock.h> | ||
15 | #include "aoe.h" | 16 | #include "aoe.h" |
16 | 17 | ||
17 | static struct kmem_cache *buf_pool_cache; | 18 | static struct kmem_cache *buf_pool_cache; |
@@ -124,13 +125,16 @@ aoeblk_open(struct block_device *bdev, fmode_t mode) | |||
124 | struct aoedev *d = bdev->bd_disk->private_data; | 125 | struct aoedev *d = bdev->bd_disk->private_data; |
125 | ulong flags; | 126 | ulong flags; |
126 | 127 | ||
128 | lock_kernel(); | ||
127 | spin_lock_irqsave(&d->lock, flags); | 129 | spin_lock_irqsave(&d->lock, flags); |
128 | if (d->flags & DEVFL_UP) { | 130 | if (d->flags & DEVFL_UP) { |
129 | d->nopen++; | 131 | d->nopen++; |
130 | spin_unlock_irqrestore(&d->lock, flags); | 132 | spin_unlock_irqrestore(&d->lock, flags); |
133 | unlock_kernel(); | ||
131 | return 0; | 134 | return 0; |
132 | } | 135 | } |
133 | spin_unlock_irqrestore(&d->lock, flags); | 136 | spin_unlock_irqrestore(&d->lock, flags); |
137 | unlock_kernel(); | ||
134 | return -ENODEV; | 138 | return -ENODEV; |
135 | } | 139 | } |
136 | 140 | ||
@@ -173,7 +177,7 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio) | |||
173 | BUG(); | 177 | BUG(); |
174 | bio_endio(bio, -ENXIO); | 178 | bio_endio(bio, -ENXIO); |
175 | return 0; | 179 | return 0; |
176 | } else if (bio_rw_flagged(bio, BIO_RW_BARRIER)) { | 180 | } else if (bio->bi_rw & REQ_HARDBARRIER) { |
177 | bio_endio(bio, -EOPNOTSUPP); | 181 | bio_endio(bio, -EOPNOTSUPP); |
178 | return 0; | 182 | return 0; |
179 | } else if (bio->bi_io_vec == NULL) { | 183 | } else if (bio->bi_io_vec == NULL) { |