diff options
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/super.c | 4 | ||||
-rw-r--r-- | fs/jffs2/wbuf.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index ff487954cd96..d3d8799e2187 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
@@ -100,6 +100,10 @@ static int jffs2_sync_fs(struct super_block *sb, int wait) | |||
100 | { | 100 | { |
101 | struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); | 101 | struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); |
102 | 102 | ||
103 | #ifdef CONFIG_JFFS2_FS_WRITEBUFFER | ||
104 | cancel_delayed_work_sync(&c->wbuf_dwork); | ||
105 | #endif | ||
106 | |||
103 | mutex_lock(&c->alloc_sem); | 107 | mutex_lock(&c->alloc_sem); |
104 | jffs2_flush_wbuf_pad(c); | 108 | jffs2_flush_wbuf_pad(c); |
105 | mutex_unlock(&c->alloc_sem); | 109 | mutex_unlock(&c->alloc_sem); |
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 6f4529d3697f..a6597d60d76d 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -1044,10 +1044,10 @@ int jffs2_check_oob_empty(struct jffs2_sb_info *c, | |||
1044 | ops.datbuf = NULL; | 1044 | ops.datbuf = NULL; |
1045 | 1045 | ||
1046 | ret = mtd_read_oob(c->mtd, jeb->offset, &ops); | 1046 | ret = mtd_read_oob(c->mtd, jeb->offset, &ops); |
1047 | if (ret || ops.oobretlen != ops.ooblen) { | 1047 | if ((ret && !mtd_is_bitflip(ret)) || ops.oobretlen != ops.ooblen) { |
1048 | pr_err("cannot read OOB for EB at %08x, requested %zd bytes, read %zd bytes, error %d\n", | 1048 | pr_err("cannot read OOB for EB at %08x, requested %zd bytes, read %zd bytes, error %d\n", |
1049 | jeb->offset, ops.ooblen, ops.oobretlen, ret); | 1049 | jeb->offset, ops.ooblen, ops.oobretlen, ret); |
1050 | if (!ret) | 1050 | if (!ret || mtd_is_bitflip(ret)) |
1051 | ret = -EIO; | 1051 | ret = -EIO; |
1052 | return ret; | 1052 | return ret; |
1053 | } | 1053 | } |
@@ -1086,10 +1086,10 @@ int jffs2_check_nand_cleanmarker(struct jffs2_sb_info *c, | |||
1086 | ops.datbuf = NULL; | 1086 | ops.datbuf = NULL; |
1087 | 1087 | ||
1088 | ret = mtd_read_oob(c->mtd, jeb->offset, &ops); | 1088 | ret = mtd_read_oob(c->mtd, jeb->offset, &ops); |
1089 | if (ret || ops.oobretlen != ops.ooblen) { | 1089 | if ((ret && !mtd_is_bitflip(ret)) || ops.oobretlen != ops.ooblen) { |
1090 | pr_err("cannot read OOB for EB at %08x, requested %zd bytes, read %zd bytes, error %d\n", | 1090 | pr_err("cannot read OOB for EB at %08x, requested %zd bytes, read %zd bytes, error %d\n", |
1091 | jeb->offset, ops.ooblen, ops.oobretlen, ret); | 1091 | jeb->offset, ops.ooblen, ops.oobretlen, ret); |
1092 | if (!ret) | 1092 | if (!ret || mtd_is_bitflip(ret)) |
1093 | ret = -EIO; | 1093 | ret = -EIO; |
1094 | return ret; | 1094 | return ret; |
1095 | } | 1095 | } |