Browse Source

block: Honor the gfp_mask for alloc_page() in blkdev_issue_discard()

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
OGAWA Hirofumi 15 years ago
parent
commit
e79e95db5c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      block/blk-barrier.c

+ 1 - 1
block/blk-barrier.c

@@ -402,7 +402,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
 		 * our current implementations need.  If we'll ever need
 		 * our current implementations need.  If we'll ever need
 		 * more the interface will need revisiting.
 		 * more the interface will need revisiting.
 		 */
 		 */
-		page = alloc_page(GFP_KERNEL | __GFP_ZERO);
+		page = alloc_page(gfp_mask | __GFP_ZERO);
 		if (!page)
 		if (!page)
 			goto out_free_bio;
 			goto out_free_bio;
 		if (bio_add_pc_page(q, bio, page, sector_size, 0) < sector_size)
 		if (bio_add_pc_page(q, bio, page, sector_size, 0) < sector_size)