aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/erase.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/erase.c')
-rw-r--r--fs/jffs2/erase.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index dad68fdffe9e..fecf5584f830 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -373,12 +373,8 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
373 goto filebad; 373 goto filebad;
374 } 374 }
375 375
376 jeb->first_node = jeb->last_node = NULL; 376 /* Everything else got zeroed before the erase */
377 jeb->free_size = c->sector_size; 377 jeb->free_size = c->sector_size;
378 jeb->used_size = 0;
379 jeb->dirty_size = 0;
380 jeb->wasted_size = 0;
381
382 } else { 378 } else {
383 379
384 struct kvec vecs[1]; 380 struct kvec vecs[1];
@@ -412,17 +408,13 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
412 goto filebad; 408 goto filebad;
413 } 409 }
414 410
411 /* Everything else got zeroed before the erase */
412 jeb->free_size = c->sector_size;
413
415 marker_ref->next_in_ino = NULL; 414 marker_ref->next_in_ino = NULL;
416 marker_ref->next_phys = NULL;
417 marker_ref->flash_offset = jeb->offset | REF_NORMAL; 415 marker_ref->flash_offset = jeb->offset | REF_NORMAL;
418 marker_ref->__totlen = c->cleanmarker_size;
419
420 jeb->first_node = jeb->last_node = marker_ref;
421 416
422 jeb->free_size = c->sector_size - c->cleanmarker_size; 417 jffs2_link_node_ref(c, jeb, marker_ref, c->cleanmarker_size);
423 jeb->used_size = c->cleanmarker_size;
424 jeb->dirty_size = 0;
425 jeb->wasted_size = 0;
426 } 418 }
427 419
428 spin_lock(&c->erase_completion_lock); 420 spin_lock(&c->erase_completion_lock);