* [PATCH] block: discard use gfp_mask
@ 2009-12-30 19:07 Hugh Dickins
2009-12-30 19:10 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Hugh Dickins @ 2009-12-30 19:07 UTC (permalink / raw)
To: Jens Axboe; +Cc: Christoph Hellwig, linux-kernel
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] block: discard use gfp_mask
2009-12-30 19:07 [PATCH] block: discard use gfp_mask Hugh Dickins
@ 2009-12-30 19:10 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2009-12-30 19:10 UTC (permalink / raw)
To: Hugh Dickins; +Cc: Christoph Hellwig, linux-kernel
On Wed, Dec 30 2009, Hugh Dickins wrote:
> 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.
An identical patch from OGAWA Hirofumi is already included in my current
tree. Linus hasn't pulled it yet, but I did send out a request
yesterday. So hopefully it'll show up in a -git near you soon :-)
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-30 19:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-30 19:07 [PATCH] block: discard use gfp_mask Hugh Dickins
2009-12-30 19:10 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox