All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
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>
Subject: Re: [PATCH 2/7] zram: switch to crypto compress API
Date: Fri, 27 May 2016 16:59:34 +0900	[thread overview]
Message-ID: <20160527075934.GC504@swordfish> (raw)
In-Reply-To: <20160527042207.GB2322@bbox>

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

  reply	other threads:[~2016-05-27  8:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 14:29 [PATCH 0/7] zram: switch to crypto api Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 1/7] zram: rename zstrm find-release functions Sergey Senozhatsky
2016-05-26  0:44   ` Minchan Kim
2016-05-26  1:07     ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 2/7] zram: switch to crypto compress API Sergey Senozhatsky
2016-05-27  4:22   ` Minchan Kim
2016-05-27  7:59     ` Sergey Senozhatsky [this message]
2016-05-25 14:30 ` [PATCH 3/7] zram: drop zcomp param from compress/decompress Sergey Senozhatsky
2016-05-27  4:22   ` Minchan Kim
2016-05-27  7:31     ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 4/7] zram: align zcomp interface to crypto comp API Sergey Senozhatsky
2016-05-27  4:31   ` Minchan Kim
2016-05-27  8:00     ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 5/7] zram: use crypto api to check alg availability Sergey Senozhatsky
2016-05-27  4:43   ` Minchan Kim
2016-05-27  7:50     ` Sergey Senozhatsky
2016-05-27  8:27       ` Minchan Kim
2016-05-27  8:43         ` Herbert Xu
2016-05-27  9:04           ` Minchan Kim
2016-05-29  3:24             ` Sergey Senozhatsky
2016-05-30  4:47               ` Minchan Kim
2016-05-30  4:57                 ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 6/7] zram: delete custom lzo/lz4 Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 7/7] zram: add more compression algorithms Sergey Senozhatsky
2016-05-26  0:43 ` [PATCH 0/7] zram: switch to crypto api Joonsoo Kim
2016-05-26  1:12   ` Sergey Senozhatsky
2016-05-26  1:52     ` Joonsoo Kim
2016-05-26  0:52 ` Minchan Kim
2016-05-26  1:08   ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160527075934.GC504@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=sergey.senozhatsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.