Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298111
b: refs/heads/master
c: bb4a098
h: refs/heads/master
i:
  298109: 85e4343
  298107: 2a2b047
  298103: 5d7606e
  298095: 5025091
  298079: 3c6eebb
  298047: 1093d32
  297983: d5e8fd9
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Mar 26, 2012
1 parent 02ab21e commit 5910f13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: 79186876441278e7276d335448a4cb47fc4c1d8e
refs/heads/master: bb4a09866faebe33bf842ecb864fef2ce042b01c
9 changes: 4 additions & 5 deletions trunk/drivers/mtd/mtdoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void mtdoops_workfunc_erase(struct work_struct *work)
cxt->nextpage = 0;
}

while (mtd_can_have_bb(mtd)) {
while (1) {
ret = mtd_block_isbad(mtd, cxt->nextpage * record_size);
if (!ret)
break;
Expand Down Expand Up @@ -199,9 +199,9 @@ static void mtdoops_workfunc_erase(struct work_struct *work)
return;
}

if (mtd_can_have_bb(mtd) && ret == -EIO) {
if (ret == -EIO) {
ret = mtd_block_markbad(mtd, cxt->nextpage * record_size);
if (ret < 0) {
if (ret < 0 && ret != -EOPNOTSUPP) {
printk(KERN_ERR "mtdoops: block_markbad failed, aborting\n");
return;
}
Expand Down Expand Up @@ -257,8 +257,7 @@ static void find_next_position(struct mtdoops_context *cxt)
size_t retlen;

for (page = 0; page < cxt->oops_pages; page++) {
if (mtd_can_have_bb(mtd) &&
mtd_block_isbad(mtd, page * record_size))
if (mtd_block_isbad(mtd, page * record_size))
continue;
/* Assume the page is used */
mark_page_used(cxt, page);
Expand Down

0 comments on commit 5910f13

Please sign in to comment.