File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2382,15 +2382,15 @@ static int zram_add(void)
2382
2382
zram -> disk -> private_data = zram ;
2383
2383
snprintf (zram -> disk -> disk_name , 16 , "zram%d" , device_id );
2384
2384
2385
+ zram_comp_params_reset (zram );
2386
+ comp_algorithm_set (zram , ZRAM_PRIMARY_COMP , default_compressor );
2387
+
2385
2388
/* Actual capacity set using sysfs (/sys/block/zram<id>/disksize */
2386
2389
set_capacity (zram -> disk , 0 );
2387
2390
ret = device_add_disk (NULL , zram -> disk , zram_disk_groups );
2388
2391
if (ret )
2389
2392
goto out_cleanup_disk ;
2390
2393
2391
- zram_comp_params_reset (zram );
2392
- comp_algorithm_set (zram , ZRAM_PRIMARY_COMP , default_compressor );
2393
-
2394
2394
zram_debugfs_register (zram );
2395
2395
pr_info ("Added device: %s\n" , zram -> disk -> disk_name );
2396
2396
return device_id ;
You can’t perform that action at this time.
0 commit comments