diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-21 00:02:06 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-21 00:02:06 +0100 |
commit | 6171586a7ae5198988774e8480631e8d15f65dfe (patch) | |
tree | eef74bde60005c4e39c0c213030b27cb07a5c236 /fs/jffs2/summary.c | |
parent | fb9fbbcc9389edabb172ac1b6419c01e32046787 (diff) | |
download | linux-stable-6171586a7ae5198988774e8480631e8d15f65dfe.tar.gz linux-stable-6171586a7ae5198988774e8480631e8d15f65dfe.tar.bz2 linux-stable-6171586a7ae5198988774e8480631e8d15f65dfe.zip |
[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.c | 9 |
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 } #endif default : { - BUG(); /* unknown node in summary information */ + if ((je16_to_cpu(temp->u.nodetype) & JFFS2_COMPAT_MASK) + == JFFS2_FEATURE_RWCOMPAT_COPY) { + dbg_summary("Writing unknown RWCOMPAT_COPY node type %x\n", + je16_to_cpu(temp->u.nodetype)); + jffs2_sum_disable_collecting(c->summary); + } else { + BUG(); /* unknown node in summary information */ + } } } |