kernel: fix an issue with infinite stack traces on MIPS
[oweals/openwrt.git] / target / linux / generic / pending-4.14 / 493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch
index 06cd1b62acf86b0976046471c6500de6a89b88e2..1bb53ada7fc9ef7ff2f256f80c1308a48809b574 100644 (file)
@@ -17,9 +17,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  #include "ubi-media.h"
  #include "ubi.h"
 @@ -445,6 +446,15 @@ int ubiblock_create(struct ubi_volume_in
-       add_disk(dev->gd);
        dev_info(disk_to_dev(dev->gd), "created from ubi%d:%d(%s)",
                 dev->ubi_num, dev->vol_id, vi->name);
+       mutex_unlock(&devices_mutex);
 +
 +      if (!strcmp(vi->name, "rootfs") &&
 +          IS_ENABLED(CONFIG_MTD_ROOTFS_ROOT_DEV) &&