aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
authorZoltan Sogor <weth@inf.u-szeged.hu>2006-09-16 15:15:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-16 15:54:32 -0400
commit27bea3275515e5bd748ed7a492d0df605f5e824a (patch)
treeeea0bc13de3a00717a78c6dfa860d09172a09919 /fs/jffs2
parent96da96065bd66164acc3c8a1ea6db4ee765537e9 (diff)
[PATCH] JFFS2: SUMMARY: fix a summary collecting bug
In some special case (padding because of sync or umount) it can be possible that summary information is not fit to the end of the erase block. In these cases the collecting of summary is disabled for this erase block. The problem was that this was not respected by jffs2_sum_add_kvec(). This patch fix this bug. Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/summary.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c
index c19bd476e8ec..e52cef526d90 100644
--- a/fs/jffs2/summary.c
+++ b/fs/jffs2/summary.c
@@ -252,6 +252,11 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs,
252 union jffs2_node_union *node; 252 union jffs2_node_union *node;
253 struct jffs2_eraseblock *jeb; 253 struct jffs2_eraseblock *jeb;
254 254
255 if (c->summary->sum_size == JFFS2_SUMMARY_NOSUM_SIZE) {
256 dbg_summary("Summary is disabled for this jeb! Skipping summary info!\n");
257 return 0;
258 }
259
255 node = invecs[0].iov_base; 260 node = invecs[0].iov_base;
256 jeb = &c->blocks[ofs / c->sector_size]; 261 jeb = &c->blocks[ofs / c->sector_size];
257 ofs -= jeb->offset; 262 ofs -= jeb->offset;