public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: [PATCH] block: blk_queue_bounce_limits can actually sleep
Date: Mon, 19 May 2008 20:24:09 -0700	[thread overview]
Message-ID: <20080519202409.6d1055be@infradead.org> (raw)

From: Arjan van de Ven <arjan@linux.intel.com>
Subject: [PATCH] block: blk_queue_bounce_limits can actually sleep

blk_queue_bounce_limit can call init_emergency_isa_pool, which
does sleeping allocations... document it as such by adding might_sleep() to the driver

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
 block/blk-settings.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/block/blk-settings.c b/block/blk-settings.c
index 8dd8641..c420a67 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -148,6 +148,7 @@ void blk_queue_bounce_limit(struct request_queue *q, u64 dma_addr)
 	q->bounce_pfn = b_pfn;
 #endif
 	if (dma) {
+		might_sleep();
 		init_emergency_isa_pool();
 		q->bounce_gfp = GFP_NOIO | GFP_DMA;
 		q->bounce_pfn = b_pfn;
-- 
1.5.4.5


             reply	other threads:[~2008-05-20 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20  3:24 Arjan van de Ven [this message]
2008-05-20 19:29 ` [PATCH] block: blk_queue_bounce_limits can actually sleep Jens Axboe
2008-05-20 19:45   ` Andrew Morton
2008-05-20 19:58     ` Jens Axboe
2008-05-20 21:02       ` Arjan van de Ven
2008-05-20 20:03     ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080519202409.6d1055be@infradead.org \
    --to=arjan@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox