[PATCH 1/3] kvm: ensure non-overlapping intervals in rb_int_insert()

2012-11-24 Thread Michel Lespinasse
The rbtree interval API is designed for handling non-overlapping intervals; modify rb_int_insert() to guarantee this property is maintained by returning -EEXIST when attempting to insert a new interval that overlaps an existing interval. Also fix an issue where the computation of 'result' could

[PATCH 1/3] kvm: ensure non-overlapping intervals in rb_int_insert()

2012-11-24 Thread Michel Lespinasse
The rbtree interval API is designed for handling non-overlapping intervals; modify rb_int_insert() to guarantee this property is maintained by returning -EEXIST when attempting to insert a new interval that overlaps an existing interval. Also fix an issue where the computation of 'result' could