diff options
-rw-r--r-- | fs/ubifs/replay.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index e27346f6c67c..5e815034aabd 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c | |||
@@ -713,6 +713,7 @@ static int replay_buds(struct ubifs_info *c) | |||
713 | { | 713 | { |
714 | struct bud_entry *b; | 714 | struct bud_entry *b; |
715 | int err, uninitialized_var(free), uninitialized_var(dirty); | 715 | int err, uninitialized_var(free), uninitialized_var(dirty); |
716 | unsigned long long prev_sqnum = 0; | ||
716 | 717 | ||
717 | list_for_each_entry(b, &c->replay_buds, list) { | 718 | list_for_each_entry(b, &c->replay_buds, list) { |
718 | err = replay_bud(c, b->bud->lnum, b->bud->start, b->bud->jhead, | 719 | err = replay_bud(c, b->bud->lnum, b->bud->start, b->bud->jhead, |
@@ -723,6 +724,9 @@ static int replay_buds(struct ubifs_info *c) | |||
723 | free, dirty, b->bud->jhead); | 724 | free, dirty, b->bud->jhead); |
724 | if (err) | 725 | if (err) |
725 | return err; | 726 | return err; |
727 | |||
728 | ubifs_assert(b->sqnum > prev_sqnum); | ||
729 | prev_sqnum = b->sqnum; | ||
726 | } | 730 | } |
727 | 731 | ||
728 | return 0; | 732 | return 0; |