mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>,
	Mahendran Ganesh <opensource.ganesh@gmail.com>,
	Nitin Gupta <ngupta@vflare.org>,
	linux-mm@kvack.or, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] zsmalloc: fix zs_init cpu notifier error handling
Date: Tue, 18 Nov 2014 14:12:12 -0800	[thread overview]
Message-ID: <20141118141212.07b64fdd2f32e8d3b0f725cb@linux-foundation.org> (raw)
In-Reply-To: <1415969826-6416-1-git-send-email-sergey.senozhatsky@gmail.com>

On Fri, 14 Nov 2014 21:57:06 +0900 Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote:

> Mahendran Ganesh reported that zpool-enabled zsmalloc should not
> call zpool_unregister_driver() from zs_init() if cpu notifier
> registration has failed, because error handling is performed
> before we register the driver via zpool_register_driver() call.
> 
> Factor out cpu notifier registration and unregistration code and
> fix zs_init() error handling.


So we can now do this, yes?

--- a/mm/zsmalloc.c~mm-zsmallocc-use-__init-and-__exit
+++ a/mm/zsmalloc.c
@@ -911,7 +911,7 @@ static int zs_register_cpu_notifier(void
 	return notifier_to_errno(ret);
 }
 
-static void zs_exit(void)
+static void __exit zs_exit(void)
 {
 #ifdef CONFIG_ZPOOL
 	zpool_unregister_driver(&zs_zpool_driver);
@@ -919,7 +919,7 @@ static void zs_exit(void)
 	zs_unregister_cpu_notifier();
 }
 
-static int zs_init(void)
+static int __init zs_init(void)
 {
 	int ret = zs_register_cpu_notifier();
 


  reply	other threads:[~2014-11-18 22:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-14 12:57 Sergey Senozhatsky
2014-11-18 22:12 ` Andrew Morton [this message]
2014-11-19 13:14   ` 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=20141118141212.07b64fdd2f32e8d3b0f725cb@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.or \
    --cc=minchan@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

all inboxes | Powered by JetHome®