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