zcomp.c (917a59e81c342f47a45be8af7792dae64d317984) zcomp.c (2152247c55b6bfc8d5178506787b1c38ea2679f1)
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#include <linux/kernel.h>
4#include <linux/string.h>
5#include <linux/err.h>
6#include <linux/slab.h>
7#include <linux/wait.h>
8#include <linux/sched.h>
9#include <linux/cpu.h>
10#include <linux/crypto.h>
11#include <linux/vmalloc.h>
12
13#include "zcomp.h"
14
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#include <linux/kernel.h>
4#include <linux/string.h>
5#include <linux/err.h>
6#include <linux/slab.h>
7#include <linux/wait.h>
8#include <linux/sched.h>
9#include <linux/cpu.h>
10#include <linux/crypto.h>
11#include <linux/vmalloc.h>
12
13#include "zcomp.h"
14
15#include "backend_lzo.h"
16#include "backend_lzorle.h"
17
15static const struct zcomp_ops *backends[] = {
18static const struct zcomp_ops *backends[] = {
19#if IS_ENABLED(CONFIG_ZRAM_BACKEND_LZO)
20 &backend_lzorle,
21 &backend_lzo,
22#endif
16 NULL
17};
18
19static void zcomp_strm_free(struct zcomp *comp, struct zcomp_strm *zstrm)
20{
21 if (zstrm->ctx)
22 comp->ops->destroy_ctx(zstrm->ctx);
23 vfree(zstrm->buffer);

--- 161 unchanged lines hidden ---
23 NULL
24};
25
26static void zcomp_strm_free(struct zcomp *comp, struct zcomp_strm *zstrm)
27{
28 if (zstrm->ctx)
29 comp->ops->destroy_ctx(zstrm->ctx);
30 vfree(zstrm->buffer);

--- 161 unchanged lines hidden ---