jffs2_truncate_fragtree does not handle NULL return from jffs2_lookup_node_frag
Artem Bityutskiy
dedekind at infradead.org
Wed Nov 22 11:27:04 EST 2006
On Tue, 2006-11-21 at 23:35 -0800, Dragan Marinkovic wrote:
> Digging a bit deeper, I found that jffs2_truncate_fragtree is not
> handling the NULL as a return value from jffs2_lookup_node_frag . It looks
> like that NULL return is perfectly legal. The patch to fix this is attached.
> I'm not really sure if this is the right place to fix this problem but
> it should be OK from the correctness prospective (can't use NULL
> pointers).
The NULL is legal, but JFFS2 does handle it. Look at the latest git
version. Please, point which particular C operation in the
jffs2_truncate_fragtree() function causes the oops.
> More to it, I've noticed that if I remove the system power while file
> on JFFS2 partition is being updated (it takes a bit of time to hit the
> right moment), I'll completely lose the file (it just disappears). Any
> ideas?
What does "JFFS2 partition is being updated" mean?
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list