mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] brd: re-enable __GFP_HIGHMEM in brd_insert_page()
@ 2019-04-22 13:23 Hou Tao
  2019-04-22 14:20 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Hou Tao @ 2019-04-22 13:23 UTC (permalink / raw)
  To: linux-block, axboe, dan.j.williams; +Cc: linux-kernel

__GFP_HIGHMEM is disabled if dax is enabled on brd, however
dax support for brd has been removed since commit (7a862fbbdec6
"brd: remove dax support"), so restore __GFP_HIGHMEM in
brd_insert_page().

Also remove the no longer applicable comments about DAX and highmem.

Cc: stable@vger.kernel.org
Fixes: 7a862fbbdec6 ("brd: remove dax support")
Signed-off-by: Hou Tao <houtao1@huawei.com>
---
 drivers/block/brd.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index c18586fccb6f..17defbf4f332 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -96,13 +96,8 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector)
 	/*
 	 * Must use NOIO because we don't want to recurse back into the
 	 * block or filesystem layers from page reclaim.
-	 *
-	 * Cannot support DAX and highmem, because our ->direct_access
-	 * routine for DAX must return memory that is always addressable.
-	 * If DAX was reworked to use pfns and kmap throughout, this
-	 * restriction might be able to be lifted.
 	 */
-	gfp_flags = GFP_NOIO | __GFP_ZERO;
+	gfp_flags = GFP_NOIO | __GFP_ZERO | __GFP_HIGHMEM;
 	page = alloc_page(gfp_flags);
 	if (!page)
 		return NULL;
-- 
2.16.2.dirty


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] brd: re-enable __GFP_HIGHMEM in brd_insert_page()
  2019-04-22 13:23 [PATCH] brd: re-enable __GFP_HIGHMEM in brd_insert_page() Hou Tao
@ 2019-04-22 14:20 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-04-22 14:20 UTC (permalink / raw)
  To: Hou Tao, linux-block, dan.j.williams; +Cc: linux-kernel

On 4/22/19 7:23 AM, Hou Tao wrote:
> __GFP_HIGHMEM is disabled if dax is enabled on brd, however
> dax support for brd has been removed since commit (7a862fbbdec6
> "brd: remove dax support"), so restore __GFP_HIGHMEM in
> brd_insert_page().

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-22 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-22 13:23 [PATCH] brd: re-enable __GFP_HIGHMEM in brd_insert_page() Hou Tao
2019-04-22 14:20 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®