mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] block: discard use gfp_mask
Date: Wed, 30 Dec 2009 19:07:47 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LSU.2.00.0912301900460.25340@sister.anvils> (raw)

blkdev_issue_discard() takes a gfp_mask argument: usually GFP_KERNEL,
but GFP_NOIO from swap and GFP_NOFS from gfs2.  blkdev_issue_discard()
should use that for its alloc_page(), instead of assuming GFP_KERNEL.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
---

 block/blk-barrier.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 2.6.33-rc2/block/blk-barrier.c	2009-12-03 03:51:21.000000000 +0000
+++ linux/block/blk-barrier.c	2009-12-26 18:28:30.000000000 +0000
@@ -402,7 +402,7 @@ int blkdev_issue_discard(struct block_de
 		 * our current implementations need.  If we'll ever need
 		 * more the interface will need revisiting.
 		 */
-		page = alloc_page(GFP_KERNEL | __GFP_ZERO);
+		page = alloc_page(gfp_mask | __GFP_ZERO);
 		if (!page)
 			goto out_free_bio;
 		if (bio_add_pc_page(q, bio, page, sector_size, 0) < sector_size)

             reply	other threads:[~2009-12-30 19:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 19:07 Hugh Dickins [this message]
2009-12-30 19:10 ` Jens Axboe

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=alpine.LSU.2.00.0912301900460.25340@sister.anvils \
    --to=hugh.dickins@tiscali.co.uk \
    --cc=hch@infradead.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

all inboxes | Powered by JetHome®