1
0
Fork 0

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 <hujianyang@huawei.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
hifive-unleashed-5.1
Artem Bityutskiy 2014-07-16 15:29:21 +03:00
parent f1cb705acc
commit 545f7fdf6d
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}