diff options
Diffstat (limited to 'drivers/block/aoe/aoeblk.c')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 65deffde60ac..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 | ||