Skip to content

Commit 6e78c01

Browse files
shenkirichardweinberger
authored andcommitted
Revert "jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()"
This reverts commit f2538f9. The patch stopped JFFS2 from being able to mount an existing filesystem with the following errors: jffs2: error: (77) jffs2_build_inode_fragtree: Add node to tree failed -22 jffs2: error: (77) jffs2_do_read_inode_internal: Failed to build final fragtree for inode #5377: error -22 Fixes: f2538f9 ("jffs2: Fix possible null-pointer dereferences...") Cc: [email protected] Suggested-by: Hou Tao <[email protected]> Signed-off-by: Joel Stanley <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent f9c34bb commit 6e78c01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/jffs2/nodelist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static int jffs2_add_frag_to_fragtree(struct jffs2_sb_info *c, struct rb_root *r
226226
lastend = this->ofs + this->size;
227227
} else {
228228
dbg_fragtree2("lookup gave no frag\n");
229-
return -EINVAL;
229+
lastend = 0;
230230
}
231231

232232
/* See if we ran off the end of the fragtree */

0 commit comments

Comments
 (0)