[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230326232909.GD19631@lst.de>
Date: Mon, 27 Mar 2023 01:29:09 +0200
From: Christoph Hellwig <hch@....de>
To: Liu Shixin <liushixin2@...wei.com>
Cc: Seth Jennings <sjenning@...hat.com>,
Dan Streetman <ddstreet@...e.org>,
Vitaly Wool <vitaly.wool@...sulko.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Nathan Chancellor <nathan@...nel.org>,
Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH -next v7 4/4] mm/zswap: delay the initializaton of zswap
> @@ -1480,11 +1500,14 @@ static int __init zswap_debugfs_init(void)
> /*********************************
> * module init and exit
> **********************************/
> -static int __init init_zswap(void)
> +static int zswap_setup(void)
> {
> struct zswap_pool *pool;
> int ret;
>
> + if (zswap_init_state != ZSWAP_UNINIT)
> + return 0;
I feel like doing this in zswap_enabled_param_set would be a lot cleaner.
With that we could do a switch on the possible enum values for
zswap_init_state there, and that is a good way to explain the possible
outcomes.
Powered by blists - more mailing lists