summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-17 21:35:26 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-17 21:35:26 +0200
commitdfd11c2e61d3c0c417d341866ed53c44933b65b4 (patch)
tree87fe96ee6729db58f10b024d14b16f60d46e6c9f
parent[PATCH] PCI: don't override drv->shutdown unconditionally (diff)
parentWhen cfq I/O scheduler is selected, get_request() in __make_request() calls (diff)
downloadlinux-dfd11c2e61d3c0c417d341866ed53c44933b65b4.tar.xz
linux-dfd11c2e61d3c0c417d341866ed53c44933b65b4.zip
Merge 'for-linus' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block
-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 0ef7a0065ece..2210bacad56a 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));