summaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch')
-rw-r--r--target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch b/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
new file mode 100644
index 0000000000..e0c195f1ab
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
@@ -0,0 +1,25 @@
+From 5001f2e1a325b68dbf225bd17f69a4d3d975cca5 Mon Sep 17 00:00:00 2001
+From: John Crispin <john@phrozen.org>
+Date: Thu, 9 Mar 2017 09:31:44 +0100
+Subject: [PATCH 61/69] mtd: "rootfs" conflicts with OpenWrt auto mounting
+
+Signed-off-by: John Crispin <john@phrozen.org>
+---
+ drivers/mtd/mtdpart.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/mtd/mtdpart.c
++++ b/drivers/mtd/mtdpart.c
+@@ -51,7 +51,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);
+ if (!name || !child) {
+ printk(KERN_ERR"memory allocation error while creating partitions for \"%s\"\n",
+ parent->name);