|
@@ -1044,10 +1044,10 @@ int jffs2_check_oob_empty(struct jffs2_sb_info *c,
|
|
|
ops.datbuf = NULL;
|
|
|
|
|
|
ret = mtd_read_oob(c->mtd, jeb->offset, &ops);
|
|
|
- if (ret || ops.oobretlen != ops.ooblen) {
|
|
|
+ if ((ret && !mtd_is_bitflip(ret)) || ops.oobretlen != ops.ooblen) {
|
|
|
pr_err("cannot read OOB for EB at %08x, requested %zd bytes, read %zd bytes, error %d\n",
|
|
|
jeb->offset, ops.ooblen, ops.oobretlen, ret);
|
|
|
- if (!ret)
|
|
|
+ if (!ret || mtd_is_bitflip(ret))
|
|
|
ret = -EIO;
|
|
|
return ret;
|
|
|
}
|
|
@@ -1086,10 +1086,10 @@ int jffs2_check_nand_cleanmarker(struct jffs2_sb_info *c,
|
|
|
ops.datbuf = NULL;
|
|
|
|
|
|
ret = mtd_read_oob(c->mtd, jeb->offset, &ops);
|
|
|
- if (ret || ops.oobretlen != ops.ooblen) {
|
|
|
+ if ((ret && !mtd_is_bitflip(ret)) || ops.oobretlen != ops.ooblen) {
|
|
|
pr_err("cannot read OOB for EB at %08x, requested %zd bytes, read %zd bytes, error %d\n",
|
|
|
jeb->offset, ops.ooblen, ops.oobretlen, ret);
|
|
|
- if (!ret)
|
|
|
+ if (!ret || mtd_is_bitflip(ret))
|
|
|
ret = -EIO;
|
|
|
return ret;
|
|
|
}
|