File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2247,6 +2247,8 @@ static int zram_add(void)
2247
2247
zram -> disk -> private_data = zram ;
2248
2248
snprintf (zram -> disk -> disk_name , 16 , "zram%d" , device_id );
2249
2249
2250
+ comp_algorithm_set (zram , ZRAM_PRIMARY_COMP , default_compressor );
2251
+
2250
2252
/* Actual capacity set using sysfs (/sys/block/zram<id>/disksize */
2251
2253
set_capacity (zram -> disk , 0 );
2252
2254
/* zram devices sort of resembles non-rotational disks */
@@ -2281,8 +2283,6 @@ static int zram_add(void)
2281
2283
if (ret )
2282
2284
goto out_cleanup_disk ;
2283
2285
2284
- comp_algorithm_set (zram , ZRAM_PRIMARY_COMP , default_compressor );
2285
-
2286
2286
zram_debugfs_register (zram );
2287
2287
pr_info ("Added device: %s\n" , zram -> disk -> disk_name );
2288
2288
return device_id ;
You can’t perform that action at this time.
0 commit comments