From 545f7fdf6db866c26ac92346b35bc6489fb926d1 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 16 Jul 2014 15:29:21 +0300 Subject: UBIFS: add a log overlap assertion Add an assertion which checkes that the head of the log never overlaps with the tail of the log. Suggested-by: hujianyang Signed-off-by: Artem Bityutskiy --- fs/ubifs/misc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/ubifs') diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h index ee7cb5ebb6e8..81bbf796eb27 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; } -- cgit v1.2.3-70-g09d2