zram: add GFP_NOWARN to incompressible zsmalloc handle allocation
authorSergey Senozhatsky <senozhatsky@chromium.org>
Mon, 3 Mar 2025 02:03:15 +0000 (11:03 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 05:06:34 +0000 (22:06 -0700)
We normally use __GFP_NOWARN for zsmalloc handle allocations, add it to
write_incompressible_page() allocation too.

Link: https://lkml.kernel.org/r/20250303022425.285971-7-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Hillf Danton <hdanton@sina.com>
Cc: Kairui Song <ryncsn@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c

index f043f35b17a433030b7a2ce66c97e25dee2f171f..249a936b6aac3799c7bb16bfca1d3e38bbd6f43f 100644 (file)
@@ -1691,7 +1691,8 @@ static int write_incompressible_page(struct zram *zram, struct page *page,
         * like we do for compressible pages.
         */
        handle = zs_malloc(zram->mem_pool, PAGE_SIZE,
-                          GFP_NOIO | __GFP_HIGHMEM | __GFP_MOVABLE);
+                          GFP_NOIO | __GFP_NOWARN |
+                          __GFP_HIGHMEM | __GFP_MOVABLE);
        if (IS_ERR_VALUE(handle))
                return PTR_ERR((void *)handle);