We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e0447f commit c7ee791Copy full SHA for c7ee791
drivers/block/zram/zram_drv.c
@@ -2247,6 +2247,8 @@ static int zram_add(void)
2247
zram->disk->private_data = zram;
2248
snprintf(zram->disk->disk_name, 16, "zram%d", device_id);
2249
2250
+ comp_algorithm_set(zram, ZRAM_PRIMARY_COMP, default_compressor);
2251
+
2252
/* Actual capacity set using sysfs (/sys/block/zram<id>/disksize */
2253
set_capacity(zram->disk, 0);
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;
2285
- comp_algorithm_set(zram, ZRAM_PRIMARY_COMP, default_compressor);
-
2286
zram_debugfs_register(zram);
2287
pr_info("Added device: %s\n", zram->disk->disk_name);
2288
return device_id;
0 commit comments