[PATCH 026/118] drbd: Interval tree bugfix

Philipp Reisner
2011-08-25T15:33:00Z

From: Andreas Gruenbacher <agruen@linbit.com>

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
drivers/block/drbd/drbd_interval.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/block/drbd/drbd_interval.c b/drivers/block/drbd/drbd_interval.c
index 2511dd9..b77a9bd 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;
}

--
1.7.4.1