aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoeblk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/aoe/aoeblk.c')
-rw-r--r--drivers/block/aoe/aoeblk.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 528f6318ded1..167ba0af47f5 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -159,7 +159,7 @@ aoeblk_release(struct gendisk *disk, fmode_t mode)
159 return 0; 159 return 0;
160} 160}
161 161
162static int 162static void
163aoeblk_make_request(struct request_queue *q, struct bio *bio) 163aoeblk_make_request(struct request_queue *q, struct bio *bio)
164{ 164{
165 struct sk_buff_head queue; 165 struct sk_buff_head queue;
@@ -172,25 +172,25 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio)
172 if (bio == NULL) { 172 if (bio == NULL) {
173 printk(KERN_ERR "aoe: bio is NULL\n"); 173 printk(KERN_ERR "aoe: bio is NULL\n");
174 BUG(); 174 BUG();
175 return 0; 175 return;
176 } 176 }
177 d = bio->bi_bdev->bd_disk->private_data; 177 d = bio->bi_bdev->bd_disk->private_data;
178 if (d == NULL) { 178 if (d == NULL) {
179 printk(KERN_ERR "aoe: bd_disk->private_data is NULL\n"); 179 printk(KERN_ERR "aoe: bd_disk->private_data is NULL\n");
180 BUG(); 180 BUG();
181 bio_endio(bio, -ENXIO); 181 bio_endio(bio, -ENXIO);
182 return 0; 182 return;
183 } else if (bio->bi_io_vec == NULL) { 183 } else if (bio->bi_io_vec == NULL) {
184 printk(KERN_ERR "aoe: bi_io_vec is NULL\n"); 184 printk(KERN_ERR "aoe: bi_io_vec is NULL\n");
185 BUG(); 185 BUG();
186 bio_endio(bio, -ENXIO); 186 bio_endio(bio, -ENXIO);
187 return 0; 187 return;
188 } 188 }
189 buf = mempool_alloc(d->bufpool, GFP_NOIO); 189 buf = mempool_alloc(d->bufpool, GFP_NOIO);
190 if (buf == NULL) { 190 if (buf == NULL) {
191 printk(KERN_INFO "aoe: buf allocation failure\n"); 191 printk(KERN_INFO "aoe: buf allocation failure\n");
192 bio_endio(bio, -ENOMEM); 192 bio_endio(bio, -ENOMEM);
193 return 0; 193 return;
194 } 194 }
195 memset(buf, 0, sizeof(*buf)); 195 memset(buf, 0, sizeof(*buf));
196 INIT_LIST_HEAD(&buf->bufs); 196 INIT_LIST_HEAD(&buf->bufs);
@@ -211,7 +211,7 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio)
211 spin_unlock_irqrestore(&d->lock, flags); 211 spin_unlock_irqrestore(&d->lock, flags);
212 mempool_free(buf, d->bufpool); 212 mempool_free(buf, d->bufpool);
213 bio_endio(bio, -ENXIO); 213 bio_endio(bio, -ENXIO);
214 return 0; 214 return;
215 } 215 }
216 216
217 list_add_tail(&buf->bufs, &d->bufq); 217 list_add_tail(&buf->bufs, &d->bufq);
@@ -222,8 +222,6 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio)
222 222
223 spin_unlock_irqrestore(&d->lock, flags); 223 spin_unlock_irqrestore(&d->lock, flags);
224 aoenet_xmit(&queue); 224 aoenet_xmit(&queue);
225
226 return 0;
227} 225}
228 226
229static int 227static int