-static inline int deflate_gfp(void)
-{
- return in_softirq() ? GFP_ATOMIC : GFP_KERNEL;
-}
-
-static int deflate_init(void *ctx)
-{
- return 0;
-}
-
-static void deflate_exit(void *ctx)
-{
- struct deflate_ctx *dctx = ctx;
-
- if (dctx->comp_initialized)
- vfree(dctx->comp_stream.workspace);
- if (dctx->decomp_initialized)
- kfree(dctx->decomp_stream.workspace);
-}
-
-/*
- * Lazy initialization to make interface simple without allocating
- * un-needed workspaces. Thus can be called in softirq context.
- */