[PATCH 2/2] UBIFS: add a log overlap assertion
Artem Bityutskiy
dedekind1 at gmail.com
Wed Jul 16 05:42:08 PDT 2014
From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Add an assertion which checkes that the head of the log never overlaps with the
tail of the log.
Suggested-by: hujianyang <hujianyang at huawei.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
fs/ubifs/misc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h
index ee7cb5e..81bbf79 100644
--- a/fs/ubifs/misc.h
+++ b/fs/ubifs/misc.h
@@ -297,6 +297,7 @@ static inline int ubifs_next_log_lnum(const struct ubifs_info *c, int lnum)
if (lnum > c->log_last)
lnum = UBIFS_LOG_LNUM;
+ ubifs_assert(lnum != c->ltail_lnum);
return lnum;
}
--
1.9.3
More information about the linux-mtd
mailing list