提交 6e78c01f 编写于 作者: J Joel Stanley 提交者: Richard Weinberger

Revert "jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()"

This reverts commit f2538f99. 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: f2538f99 ("jffs2: Fix possible null-pointer dereferences...")
Cc: stable@vger.kernel.org
Suggested-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NJoel Stanley <joel@jms.id.au>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 f9c34bb5
......@@ -226,7 +226,7 @@ static int jffs2_add_frag_to_fragtree(struct jffs2_sb_info *c, struct rb_root *r
lastend = this->ofs + this->size;
} else {
dbg_fragtree2("lookup gave no frag\n");
return -EINVAL;
lastend = 0;
}
/* See if we ran off the end of the fragtree */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册