kernel: bump 5.15 to 5.15.32
[openwrt/staging/chunkeey.git] / target / linux / ipq806x / patches-5.15 / 102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
index 5055261c4b87af50c41f3177ff70becb0462b588..673c66ae8483a8434c6c57d48122348ee11d57a9 100644 (file)
@@ -10,16 +10,16 @@ Signed-off-by: John Crispin <john@phrozen.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -139,7 +139,11 @@
+@@ -50,7 +50,11 @@ static struct mtd_info *allocate_partiti
  
        /* allocate the partition structure */
        child = kzalloc(sizeof(*child), GFP_KERNEL);
+-      name = kstrdup(part->name, GFP_KERNEL);
 +      /* "rootfs" conflicts with OpenWrt auto mounting */
 +      if (mtd_type_is_nand(parent) && !strcmp(part->name, "rootfs"))
 +              name = "ubi";
 +      else
 +              name = kstrdup(part->name, GFP_KERNEL);
--      name = kstrdup(part->name, GFP_KERNEL);
        if (!name || !child) {
                printk(KERN_ERR"memory allocation error while creating partitions for \"%s\"\n",
                       parent->name);