diff options
Diffstat (limited to 'drivers/block/brd.c')
-rw-r--r-- | drivers/block/brd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 85364804364..e8e38faeafd 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -108,7 +108,7 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector) #ifndef CONFIG_BLK_DEV_XIP gfp_flags |= __GFP_HIGHMEM; #endif - page = alloc_page(GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO); + page = alloc_page(gfp_flags); if (!page) return NULL; @@ -319,7 +319,7 @@ out: #ifdef CONFIG_BLK_DEV_XIP static int brd_direct_access (struct block_device *bdev, sector_t sector, - unsigned long *data) + void **kaddr, unsigned long *pfn) { struct brd_device *brd = bdev->bd_disk->private_data; struct page *page; @@ -333,7 +333,8 @@ static int brd_direct_access (struct block_device *bdev, sector_t sector, page = brd_insert_page(brd, sector); if (!page) return -ENOMEM; - *data = (unsigned long)page_address(page); + *kaddr = page_address(page); + *pfn = page_to_pfn(page); return 0; } |