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 <[email protected]>
---
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)
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