浏览代码

UBI: dump stack when switching to R/O mode

If we have debugging enabled and switching to R/O mode because of an error -
dump the stack to improve UBI error reporting and make the further diagnostics
easier to do.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy 14 年之前
父节点
当前提交
2a826061df
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/mtd/ubi/ubi.h

+ 1 - 0
drivers/mtd/ubi/ubi.h

@@ -667,6 +667,7 @@ static inline void ubi_ro_mode(struct ubi_device *ubi)
 	if (!ubi->ro_mode) {
 		ubi->ro_mode = 1;
 		ubi_warn("switch to read-only mode");
+		ubi_dbg_dump_stack();
 	}
 }