summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-01-26 13:06:08 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-08-29 11:27:00 +0200
commit6618bf16384463c0b97a5f5f1f0ce5276f5865fd (patch)
treeaeb979a771554d1d1df3cfd4069fde99f641d7a9
parentdrbd: Inline function overlaps() is now unused (diff)
downloadlinux-6618bf16384463c0b97a5f5f1f0ce5276f5865fd.tar.xz
linux-6618bf16384463c0b97a5f5f1f0ce5276f5865fd.zip
drbd: Interval tree bugfix
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
-rw-r--r--drivers/block/drbd/drbd_interval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_interval.c b/drivers/block/drbd/drbd_interval.c
index 2511dd9993f3..b77a9bda03d4 100644
--- a/drivers/block/drbd/drbd_interval.c
+++ b/drivers/block/drbd/drbd_interval.c
@@ -58,8 +58,9 @@ drbd_insert_interval(struct rb_root *root, struct drbd_interval *this)
new = &(*new)->rb_right;
else if (this < here)
new = &(*new)->rb_left;
- else if (this->sector > here->sector)
+ else if (this > here)
new = &(*new)->rb_right;
+ else
return false;
}