aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/summary.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-20 19:02:06 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-20 19:02:06 -0400
commit6171586a7ae5198988774e8480631e8d15f65dfe (patch)
treeeef74bde60005c4e39c0c213030b27cb07a5c236 /fs/jffs2/summary.c
parentfb9fbbcc9389edabb172ac1b6419c01e32046787 (diff)
[JFFS2] Correct handling of JFFS2_FEATURE_RWCOMPAT_COPY nodes.
We should preserve these when we come to garbage collect them, not let them get erased. Use jffs2_garbage_collect_pristine() for this, and make sure the summary code copes -- just refrain from writing a summary for any block which contains a node we don't understand. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/summary.c')
-rw-r--r--fs/jffs2/summary.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c
index 95b5bf8f4a99..53a84b468cfe 100644
--- a/fs/jffs2/summary.c
+++ b/fs/jffs2/summary.c
@@ -760,7 +760,14 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock
760 } 760 }
761#endif 761#endif
762 default : { 762 default : {
763 BUG(); /* unknown node in summary information */ 763 if ((je16_to_cpu(temp->u.nodetype) & JFFS2_COMPAT_MASK)
764 == JFFS2_FEATURE_RWCOMPAT_COPY) {
765 dbg_summary("Writing unknown RWCOMPAT_COPY node type %x\n",
766 je16_to_cpu(temp->u.nodetype));
767 jffs2_sum_disable_collecting(c->summary);
768 } else {
769 BUG(); /* unknown node in summary information */
770 }
764 } 771 }
765 } 772 }
766 773