Re: [PATCH] zsmalloc: fix zs_init cpu notifier error handling
From: Sergey Senozhatsky
Date: Wed Nov 19 2014 - 08:13:58 EST
On (11/18/14 14:12), Andrew Morton 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?
yes, sir.
I didn't do this because I though Mahendran would resend his
patch.
thank you.
-ss
>
> --- 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();
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/