diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/cfq-iosched.c | 9 | ||||
-rw-r--r-- | drivers/block/elevator.c | 9 | ||||
-rw-r--r-- | drivers/block/ub.c | 4 |
3 files changed, 9 insertions, 13 deletions
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index 0ef7a0065ece..2210bacad56a 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c | |||
@@ -1202,13 +1202,16 @@ retry: | |||
1202 | if (new_cfqq) { | 1202 | if (new_cfqq) { |
1203 | cfqq = new_cfqq; | 1203 | cfqq = new_cfqq; |
1204 | new_cfqq = NULL; | 1204 | new_cfqq = NULL; |
1205 | } else if (gfp_mask & __GFP_WAIT) { | 1205 | } else { |
1206 | spin_unlock_irq(cfqd->queue->queue_lock); | 1206 | spin_unlock_irq(cfqd->queue->queue_lock); |
1207 | new_cfqq = kmem_cache_alloc(cfq_pool, gfp_mask); | 1207 | new_cfqq = kmem_cache_alloc(cfq_pool, gfp_mask); |
1208 | spin_lock_irq(cfqd->queue->queue_lock); | 1208 | spin_lock_irq(cfqd->queue->queue_lock); |
1209 | |||
1210 | if (!new_cfqq && !(gfp_mask & __GFP_WAIT)) | ||
1211 | goto out; | ||
1212 | |||
1209 | goto retry; | 1213 | goto retry; |
1210 | } else | 1214 | } |
1211 | goto out; | ||
1212 | 1215 | ||
1213 | memset(cfqq, 0, sizeof(*cfqq)); | 1216 | memset(cfqq, 0, sizeof(*cfqq)); |
1214 | 1217 | ||
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c index 6b79b4314622..89982925f9e2 100644 --- a/drivers/block/elevator.c +++ b/drivers/block/elevator.c | |||
@@ -220,11 +220,6 @@ void elevator_exit(elevator_t *e) | |||
220 | kfree(e); | 220 | kfree(e); |
221 | } | 221 | } |
222 | 222 | ||
223 | static int elevator_global_init(void) | ||
224 | { | ||
225 | return 0; | ||
226 | } | ||
227 | |||
228 | int elv_merge(request_queue_t *q, struct request **req, struct bio *bio) | 223 | int elv_merge(request_queue_t *q, struct request **req, struct bio *bio) |
229 | { | 224 | { |
230 | elevator_t *e = q->elevator; | 225 | elevator_t *e = q->elevator; |
@@ -322,7 +317,7 @@ void __elv_add_request(request_queue_t *q, struct request *rq, int where, | |||
322 | int nrq = q->rq.count[READ] + q->rq.count[WRITE] | 317 | int nrq = q->rq.count[READ] + q->rq.count[WRITE] |
323 | - q->in_flight; | 318 | - q->in_flight; |
324 | 319 | ||
325 | if (nrq == q->unplug_thresh) | 320 | if (nrq >= q->unplug_thresh) |
326 | __generic_unplug_device(q); | 321 | __generic_unplug_device(q); |
327 | } | 322 | } |
328 | } else | 323 | } else |
@@ -692,8 +687,6 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) | |||
692 | return len; | 687 | return len; |
693 | } | 688 | } |
694 | 689 | ||
695 | module_init(elevator_global_init); | ||
696 | |||
697 | EXPORT_SYMBOL(elv_add_request); | 690 | EXPORT_SYMBOL(elv_add_request); |
698 | EXPORT_SYMBOL(__elv_add_request); | 691 | EXPORT_SYMBOL(__elv_add_request); |
699 | EXPORT_SYMBOL(elv_requeue_request); | 692 | EXPORT_SYMBOL(elv_requeue_request); |
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index adc4dcc306f4..19c5e59bcfa8 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -51,7 +51,7 @@ | |||
51 | * This many LUNs per USB device. | 51 | * This many LUNs per USB device. |
52 | * Every one of them takes a host, see UB_MAX_HOSTS. | 52 | * Every one of them takes a host, see UB_MAX_HOSTS. |
53 | */ | 53 | */ |
54 | #define UB_MAX_LUNS 4 | 54 | #define UB_MAX_LUNS 9 |
55 | 55 | ||
56 | /* | 56 | /* |
57 | */ | 57 | */ |
@@ -2100,7 +2100,7 @@ static int ub_probe(struct usb_interface *intf, | |||
2100 | nluns = rc; | 2100 | nluns = rc; |
2101 | break; | 2101 | break; |
2102 | } | 2102 | } |
2103 | mdelay(100); | 2103 | msleep(100); |
2104 | } | 2104 | } |
2105 | 2105 | ||
2106 | for (i = 0; i < nluns; i++) { | 2106 | for (i = 0; i < nluns; i++) { |