Skip to content

Commit

Permalink
UBIFS: add a log overlap assertion
Browse files Browse the repository at this point in the history
Add an assertion which checkes that the head of the log never overlaps with the
tail of the log.

Suggested-by: hujianyang <[email protected]>
Signed-off-by: Artem Bityutskiy <[email protected]>
  • Loading branch information
dedekind committed Jul 19, 2014
1 parent f1cb705 commit 545f7fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ubifs/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 545f7fd

Please sign in to comment.