提交 604b592e 编写于 作者: M Mike Snitzer 提交者: Artem Bityutskiy

UBI: fix rb_tree node comparison in add_map

The comparisons used in add_vol() shouldn't be identical.  Pretty sure
the following is correct but it is completely untested.
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
Acked-by: NRichard Weinberger <richard@nod.at>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
上级 0da846f4
......@@ -125,9 +125,9 @@ static struct ubi_ainf_volume *add_vol(struct ubi_attach_info *ai, int vol_id,
parent = *p;
av = rb_entry(parent, struct ubi_ainf_volume, rb);
if (vol_id > av->vol_id)
if (vol_id < av->vol_id)
p = &(*p)->rb_left;
else if (vol_id > av->vol_id)
else
p = &(*p)->rb_right;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册