diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-07-16 16:29:21 +0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-07-19 10:55:19 +0400 |
commit | 545f7fdf6db866c26ac92346b35bc6489fb926d1 (patch) | |
tree | f3445328ea40a14c6efb6db248247b6a8088e7f4 /fs/ubifs | |
parent | f1cb705accc70ac327de2108ecf07b300e03fc42 (diff) | |
download | linux-545f7fdf6db866c26ac92346b35bc6489fb926d1.tar.xz |
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>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/misc.h | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |