From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
linux-kernel@vger.kernel.org, jmarchan@redhat.com,
minchan@kernel.org, ngupta@vflare.org,
opensource.ganesh@gmail.com, sergey.senozhatsky@gmail.com,
mm-commits@vger.kernel.org
Subject: Re: + zram-rework-reset-and-destroy-path-fix.patch added to -mm tree
Date: Thu, 5 Feb 2015 09:20:19 +0900 [thread overview]
Message-ID: <20150205002019.GA1681@swordfish> (raw)
In-Reply-To: <20150204142959.de8ddfef8374132b27a5d0c2@linux-foundation.org>
Hello,
sorry for late response
On (02/04/15 14:29), Andrew Morton wrote:
> Seems unnecessarily complicated. What about
>
> --- a/drivers/block/zram/zram_drv.c~zram-rework-reset-and-destroy-path-fix-2-fix
> +++ a/drivers/block/zram/zram_drv.c
> @@ -1141,7 +1141,8 @@ static void destroy_devices(unsigned int
>
> static int __init zram_init(void)
> {
> - int ret = -ENOMEM, dev_id = 0;
> + int ret;
> + int dev_id;
>
> if (num_devices > max_num_devices) {
> pr_warn("Invalid value for num_devices: %u\n",
> @@ -1157,20 +1158,23 @@ static int __init zram_init(void)
>
> /* Allocate the device array and initialize each one */
> zram_devices = kzalloc(num_devices * sizeof(struct zram), GFP_KERNEL);
> - if (!zram_devices)
> - goto out_error;
> + if (!zram_devices) {
> + ret = -ENOMEM;
we need to rollback `zram_major = register_blkdev(0, "zram");'
which is done in destroy_devices().
-ss
next prev parent reply other threads:[~2015-02-05 0:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <54d155bf.k9GCVwDVqT17beYC%akpm@linux-foundation.org>
2015-02-04 1:07 ` + zram-rework-reset-and-destroy-path-fix.patch added to -mm tree Sergey Senozhatsky
2015-02-04 22:29 ` Andrew Morton
2015-02-05 0:20 ` Sergey Senozhatsky [this message]
2015-02-05 0:36 ` 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=20150205002019.GA1681@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jmarchan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=opensource.ganesh@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox