lznt.c (e8b8e97f91b80f08a2f1b7ea4f81e7af61b2cc2f) lznt.c (d3624466b56dd5b1886c1dff500525b544c19c83)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 *
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
5 *
6 */
7
8#include <linux/blkdev.h>

--- 282 unchanged lines hidden (view full) ---

291
292/*
293 * get_lznt_ctx
294 * @level: 0 - Standard compression.
295 * !0 - Best compression, requires a lot of cpu.
296 */
297struct lznt *get_lznt_ctx(int level)
298{
1// SPDX-License-Identifier: GPL-2.0
2/*
3 *
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
5 *
6 */
7
8#include <linux/blkdev.h>

--- 282 unchanged lines hidden (view full) ---

291
292/*
293 * get_lznt_ctx
294 * @level: 0 - Standard compression.
295 * !0 - Best compression, requires a lot of cpu.
296 */
297struct lznt *get_lznt_ctx(int level)
298{
299 struct lznt *r = kzalloc(level ? offsetof(struct lznt, hash) :
300 sizeof(struct lznt), GFP_NOFS);
299 struct lznt *r = kzalloc(level ? offsetof(struct lznt, hash)
300 : sizeof(struct lznt),
301 GFP_NOFS);
301
302 if (r)
303 r->std = !level;
304 return r;
305}
306
307/*
308 * compress_lznt - Compresses @unc into @cmpr

--- 144 unchanged lines hidden ---
302
303 if (r)
304 r->std = !level;
305 return r;
306}
307
308/*
309 * compress_lznt - Compresses @unc into @cmpr

--- 144 unchanged lines hidden ---