Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312993
b: refs/heads/master
c: d51f17e
h: refs/heads/master
i:
  312991: 5d579fc
v: v3
  • Loading branch information
Artem Bityutskiy committed Jul 20, 2012
1 parent 38c894b commit a365fdf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06bef9451a4c5ad882cd15fd7a0df9890c0249f3
refs/heads/master: d51f17ea0a3afe11fb4c4ad6635877e24df2758f
20 changes: 6 additions & 14 deletions trunk/fs/ubifs/replay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ static int take_ihead(struct ubifs_info *c)
*/
int ubifs_replay_journal(struct ubifs_info *c)
{
int err, i, lnum, offs, free;
int err, lnum, free;

BUILD_BUG_ON(UBIFS_TRUN_KEY > 5);

Expand All @@ -1025,25 +1025,17 @@ int ubifs_replay_journal(struct ubifs_info *c)
dbg_mnt("start replaying the journal");
c->replaying = 1;
lnum = c->ltail_lnum = c->lhead_lnum;
offs = c->lhead_offs;

for (i = 0; i < c->log_lebs; i++, lnum++) {
if (lnum >= UBIFS_LOG_LNUM + c->log_lebs) {
/*
* The log is logically circular, we reached the last
* LEB, switch to the first one.
*/
lnum = UBIFS_LOG_LNUM;
offs = 0;
}
err = replay_log_leb(c, lnum, offs, c->sbuf);
lnum = UBIFS_LOG_LNUM;
do {
err = replay_log_leb(c, lnum, 0, c->sbuf);
if (err == 1)
/* We hit the end of the log */
break;
if (err)
goto out;
offs = 0;
}
lnum = ubifs_next_log_lnum(c, lnum);
} while (lnum != UBIFS_LOG_LNUM);

err = replay_buds(c);
if (err)
Expand Down

0 comments on commit a365fdf

Please sign in to comment.