Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347166
b: refs/heads/master
c: cd409c6
h: refs/heads/master
v: v3
  • Loading branch information
Matthieu CASTET authored and Artem Bityutskiy committed Nov 15, 2012
1 parent 6bde490 commit 07ef36e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 7c8f680e96edbd9896b13b5e6ff39bc5852dce2a
refs/heads/master: cd409c61287b81d432024c1dbfad292304bf5df3
15 changes: 7 additions & 8 deletions trunk/drivers/mtd/mtdoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static void find_next_position(struct mtdoops_context *cxt)

if (count[0] == 0xffffffff && count[1] == 0xffffffff)
mark_page_unused(cxt, page);
if (count[0] == 0xffffffff)
if (count[0] == 0xffffffff || count[1] != MTDOOPS_KERNMSG_MAGIC)
continue;
if (maxcount == 0xffffffff) {
maxcount = count[0];
Expand All @@ -289,14 +289,13 @@ static void find_next_position(struct mtdoops_context *cxt)
}
}
if (maxcount == 0xffffffff) {
cxt->nextpage = 0;
cxt->nextcount = 1;
schedule_work(&cxt->work_erase);
return;
cxt->nextpage = cxt->oops_pages - 1;
cxt->nextcount = 0;
}
else {
cxt->nextpage = maxpos;
cxt->nextcount = maxcount;
}

cxt->nextpage = maxpos;
cxt->nextcount = maxcount;

mtdoops_inc_counter(cxt);
}
Expand Down

0 comments on commit 07ef36e

Please sign in to comment.