diff options
Diffstat (limited to 'fs/jffs2/wbuf.c')
-rw-r--r-- | fs/jffs2/wbuf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index de718e3a1692..23028b384418 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -238,7 +238,10 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) | |||
238 | jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; | 238 | jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; |
239 | 239 | ||
240 | spin_lock(&c->erase_completion_lock); | 240 | spin_lock(&c->erase_completion_lock); |
241 | jffs2_block_refile(c, jeb, REFILE_NOTEMPTY); | 241 | if (c->wbuf_ofs % c->mtd->erasesize) |
242 | jffs2_block_refile(c, jeb, REFILE_NOTEMPTY); | ||
243 | else | ||
244 | jffs2_block_refile(c, jeb, REFILE_ANYWAY); | ||
242 | spin_unlock(&c->erase_completion_lock); | 245 | spin_unlock(&c->erase_completion_lock); |
243 | 246 | ||
244 | BUG_ON(!ref_obsolete(jeb->last_node)); | 247 | BUG_ON(!ref_obsolete(jeb->last_node)); |