]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/brd-re-enable-__gfp_highmem-in-brd_insert_page.patch
Linux 5.0.19
[thirdparty/kernel/stable-queue.git] / queue-4.19 / brd-re-enable-__gfp_highmem-in-brd_insert_page.patch
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()
5
6 From: Hou Tao <houtao1@huawei.com>
7
8 commit f6b50160a06d4a0d6a3999ab0c5aec4f52dba248 upstream.
9
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
13 brd_insert_page().
14
15 Also remove the no longer applicable comments about DAX and highmem.
16
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>
22
23 ---
24 drivers/block/brd.c | 7 +------
25 1 file changed, 1 insertion(+), 6 deletions(-)
26
27 --- a/drivers/block/brd.c
28 +++ b/drivers/block/brd.c
29 @@ -96,13 +96,8 @@ static struct page *brd_insert_page(stru
30 /*
31 * Must use NOIO because we don't want to recurse back into the
32 * block or filesystem layers from page reclaim.
33 - *
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.
38 */
39 - gfp_flags = GFP_NOIO | __GFP_ZERO;
40 + gfp_flags = GFP_NOIO | __GFP_ZERO | __GFP_HIGHMEM;
41 page = alloc_page(gfp_flags);
42 if (!page)
43 return NULL;