[Drbd-dev] [PATCH 026/118] drbd: Interval tree bugfix

Philipp Reisner philipp.reisner at linbit.com
Thu Aug 25 17:07:22 CEST 2011


From: Andreas Gruenbacher <agruen at linbit.com>

Signed-off-by: Philipp Reisner <philipp.reisner at linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg at 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



More information about the drbd-dev mailing list