block: Honor the gfp_mask for alloc_page() in blkdev_issue_discard()
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Tue, 29 Dec 2009 07:53:54 +0000 (08:53 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 29 Dec 2009 07:53:54 +0000 (08:53 +0100)
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-barrier.c

index 8873b9b439ffdb0bf695b0077f84bb28c1046a38..8618d8996fea9c9b278b7529d44ac958c24fa465 100644 (file)
@@ -402,7 +402,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
                 * 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)