Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1407899
| Path | csiph.com!feeder.erje.net!1.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/7] zram: switch to crypto compress API |
| Date | Fri, 27 May 2016 10:10:02 +0200 |
| Message-ID | <rDl0e-Ub-29@gated-at.bofh.it> (permalink) |
| References | <rCHcu-1wD-15@gated-at.bofh.it> <rCHcu-1wD-19@gated-at.bofh.it> <rDhzj-7b0-3@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uND8hqCg3kvZ0q1perqNXGiYi2HDc+BmhSiwuETsv+E=; b=apt15/Hk3bkBOQtZPv3SIdyW6cGHEXHtWbbcTacXJ6rwNi366aJFU0o5zLdgSgB1IN kOdxeDQUx3mBIcAFPlfQ5A5endyIdcV/1CUnpYozTkuyY6K9QWPIfPKbvlFF7MX5U0Wg bZZhSm5JNJVQ3JXB1XPfJj0Aum8iNFFyd9KtrjSopE4wUY5fVL3BZK3huPn1B6Aezcvq sQqSHatL819mX7YLufHFral+rYECh3lTWEJwD8t2OZSpDA3In/i3XxDMZWcH5DEpxEsg 6ENYFcr+7eRmqzc4iIimaqw96lSnrd+0fSK2xHmE8kJsymZcTsATVhpIhYmS3PeussGL wcUA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uND8hqCg3kvZ0q1perqNXGiYi2HDc+BmhSiwuETsv+E=; b=DlEqtNraLxD1q5ZtQCLonJYj+KRojYBLF1oka0qIIY7fy7gOtc9lmF68nMvX0v48m9 LwKKTuGfm2ldkQu8CtPlqNjxMHR73P96BKByGgyVGc5mYJ0G66pOl1C9vBJK6qAs5g8o EeP023oHtd06/XMfEgrYmGs7ANib8TGe6oXPPbnTyxRQamm33UUx44mrzHS3XoX5l5a3 o0EfnzseYXF19z/WAd5N0uXTLl8z3vW/968Pj1nBVzHBvNxu6tRuG+dJq6hp5u1E5fNd rnlHaL5FitB7EFrJf5MEcKMq1t3DMJI4/eW/MFz054aVz8YVKvPa0VoMJpwOpsKlioJJ M13Q== |
| X-Gm-Message-State | ALyK8tKBc4cBbSuKAcb+XajqbMo9QvJWKeqDEHP7K4Ht6A2TpAgKT0QtVxkBddwx00hNqg== |
| X-Received | by 10.98.102.205 with SMTP id s74mr18085718pfj.54.1464335984646; Fri, 27 May 2016 00:59:44 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.6.1 (2016-04-27) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 36 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Sergey Senozhatsky <sergey.senozhatsky@gmail.com>, Andrew Morton <akpm@linux-foundation.org>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, linux-kernel@vger.kernel.org, Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
| X-Original-Date | Fri, 27 May 2016 16:59:34 +0900 |
| X-Original-Message-ID | <20160527075934.GC504@swordfish> |
| X-Original-References | <20160525143006.1207-1-sergey.senozhatsky@gmail.com> <20160525143006.1207-3-sergey.senozhatsky@gmail.com> <20160527042207.GB2322@bbox> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1407899 |
Show key headers only | View raw
On (05/27/16 13:22), Minchan Kim wrote:
[..]
> > static void zcomp_strm_free(struct zcomp *comp, struct zcomp_strm *zstrm)
> > {
> > - if (zstrm->private)
> > - comp->backend->destroy(zstrm->private);
> > + if (!IS_ERR_OR_NULL(zstrm->private))
>
> Let's change private with tfm.
ok.
>
> > + crypto_free_comp(zstrm->private);
> > free_pages((unsigned long)zstrm->buffer, 1);
> > kfree(zstrm);
> > }
> > @@ -58,13 +55,13 @@ static struct zcomp_strm *zcomp_strm_alloc(struct zcomp *comp, gfp_t flags)
> > if (!zstrm)
> > return NULL;
> >
> > - zstrm->private = comp->backend->create(flags);
> > + zstrm->private = crypto_alloc_comp(comp->name, 0, 0);
>
> crypto_alloc_comp uses GPF_KERNEL for allocating tfm and zram uses
> GFP_KERNEL for zcomp_strm_alloc now so there is no point to pass
> gfp_t so let's clean it up.
yes, I realized that after I sent out the patch. it's basically a revert
of 75d8947a36d0c9 ("zram: pass gfp from zcomp frontend to backend"), can
do this as a separate patch in the series, as it's more of a clenup.
I also realized that passing a zcomp pointer to zcomp_strm_free() is
useless; will clean that up.
-ss
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/7] zram: switch to crypto compress API Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-05-25 15:40 +0200
Re: [PATCH 2/7] zram: switch to crypto compress API Minchan Kim <minchan@kernel.org> - 2016-05-27 06:30 +0200
Re: [PATCH 2/7] zram: switch to crypto compress API Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-27 10:10 +0200
csiph-web