aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-17 12:35:26 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-17 12:35:26 -0700
commitdfd11c2e61d3c0c417d341866ed53c44933b65b4 (patch)
tree87fe96ee6729db58f10b024d14b16f60d46e6c9f /drivers
parent794f5bfa77955c4455f6d72d8b0e2bee25f1ff0c (diff)
parentdb3b5848ea6440968fcdd29b80514d0de044bb7c (diff)
Merge 'for-linus' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/cfq-iosched.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c
index 0ef7a0065ec..2210bacad56 100644
--- a/drivers/block/cfq-iosched.c
+++ b/drivers/block/cfq-iosched.c
@@ -1202,13 +1202,16 @@ retry:
if (new_cfqq) {
cfqq = new_cfqq;
new_cfqq = NULL;
- } else if (gfp_mask & __GFP_WAIT) {
+ } else {
spin_unlock_irq(cfqd->queue->queue_lock);
new_cfqq = kmem_cache_alloc(cfq_pool, gfp_mask);
spin_lock_irq(cfqd->queue->queue_lock);
+
+ if (!new_cfqq && !(gfp_mask & __GFP_WAIT))
+ goto out;
+
goto retry;
- } else
- goto out;
+ }
memset(cfqq, 0, sizeof(*cfqq));