Skip to content

Commit

Permalink
zram: further limit recompression threshold
Browse files Browse the repository at this point in the history
Recompression threshold should be below huge-size-class
watermark.

Link: https://lkml.kernel.org/r/20230614141338.3480029-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Suggested-by: Brian Geffon <bgeffon@google.com>
Acked-by: Brian Geffon <bgeffon@google.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
sergey-senozhatsky authored and akpm00 committed Jun 15, 2023
1 parent cf88a55 commit b699517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ static ssize_t recompress_store(struct device *dev,
}
}

if (threshold >= PAGE_SIZE)
if (threshold >= huge_class_size)
return -EINVAL;

down_read(&zram->init_lock);
Expand Down

0 comments on commit b699517

Please sign in to comment.