kernel: Make the patches apply on top of 4.19
[oweals/openwrt.git] / target / linux / generic / pending-4.19 / 551-ubifs-fix-default-compression-selection.patch
index 4782fc9ed827d295425b59c543f53e73e11c1f4a..60d5619989154d6113afde0a9121fb666e794fa3 100644 (file)
@@ -12,12 +12,12 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  /* Default time granularity in nanoseconds */
  #define DEFAULT_TIME_GRAN 1000000000
  
-+static int get_default_compressor(void)
++static int get_default_compressor(struct ubifs_info *c)
 +{
-+      if (ubifs_compr_present(UBIFS_COMPR_LZO))
++      if (ubifs_compr_present(c, UBIFS_COMPR_LZO))
 +              return UBIFS_COMPR_LZO;
 +
-+      if (ubifs_compr_present(UBIFS_COMPR_ZLIB))
++      if (ubifs_compr_present(c, UBIFS_COMPR_ZLIB))
 +              return UBIFS_COMPR_ZLIB;
 +
 +      return UBIFS_COMPR_NONE;
@@ -31,7 +31,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
                sup->default_compr = cpu_to_le16(c->mount_opts.compr_type);
        else
 -              sup->default_compr = cpu_to_le16(UBIFS_COMPR_LZO);
-+              sup->default_compr = cpu_to_le16(get_default_compressor());
++              sup->default_compr = cpu_to_le16(get_default_compressor(c));
  
        generate_random_uuid(sup->uuid);