> @@ -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.