From 2a826061df67f205636b953f58f8bede2a3f009c Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 20 May 2011 17:24:34 +0300 Subject: 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 --- drivers/mtd/ubi/ubi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/mtd') diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index fd19f8d3bce8..dc64c767fd21 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/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(); } } -- cgit v1.2.3-59-g8ed1b