Skip to content
Commit fcf3cafb authored by David Woodhouse's avatar David Woodhouse
Browse files

[JFFS2] Remove another bogus optimisation in jffs2_add_tn_to_tree()



We attempted to insert new nodes into the tree by just using
rb_replace_node to let them replace an earlier node which they
completely overlapped. However, that could place the new node into the
wrong place in the tree, since its start could be node only before the
start of the victim, but before the node _before_ the victim in the tree
(if that previous node actually ends _after_ the new node, thus isn't
entirely overlapped and wasn't itself chosen to be the victim).

Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 96dd8d25
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment