1 From f6b50160a06d4a0d6a3999ab0c5aec4f52dba248 Mon Sep 17 00:00:00 2001
2 From: Hou Tao <houtao1@huawei.com>
3 Date: Mon, 22 Apr 2019 21:23:21 +0800
4 Subject: brd: re-enable __GFP_HIGHMEM in brd_insert_page()
6 From: Hou Tao <houtao1@huawei.com>
8 commit f6b50160a06d4a0d6a3999ab0c5aec4f52dba248 upstream.
10 __GFP_HIGHMEM is disabled if dax is enabled on brd, however
11 dax support for brd has been removed since commit (7a862fbbdec6
12 "brd: remove dax support"), so restore __GFP_HIGHMEM in
15 Also remove the no longer applicable comments about DAX and highmem.
17 Cc: stable@vger.kernel.org
18 Fixes: 7a862fbbdec6 ("brd: remove dax support")
19 Signed-off-by: Hou Tao <houtao1@huawei.com>
20 Signed-off-by: Jens Axboe <axboe@kernel.dk>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24 drivers/block/brd.c | 7 +------
25 1 file changed, 1 insertion(+), 6 deletions(-)
27 --- a/drivers/block/brd.c
28 +++ b/drivers/block/brd.c
29 @@ -96,13 +96,8 @@ static struct page *brd_insert_page(stru
31 * Must use NOIO because we don't want to recurse back into the
32 * block or filesystem layers from page reclaim.
34 - * Cannot support DAX and highmem, because our ->direct_access
35 - * routine for DAX must return memory that is always addressable.
36 - * If DAX was reworked to use pfns and kmap throughout, this
37 - * restriction might be able to be lifted.
39 - gfp_flags = GFP_NOIO | __GFP_ZERO;
40 + gfp_flags = GFP_NOIO | __GFP_ZERO | __GFP_HIGHMEM;
41 page = alloc_page(gfp_flags);