From: Lai Jiangshan Date: Thu, 18 Sep 2014 14:49:41 +0000 (+0200) Subject: drbd: compute the end before rb_insert_augmented() X-Git-Tag: fixes-against-v3.18-rc2~52^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82cfb90bc99d7b7e0ec62d0505b9d4f06805d5db;p=pandora-kernel.git drbd: compute the end before rb_insert_augmented() Commit 98683650 "Merge branch 'drbd-8.4_ed6' into for-3.8-drivers-drbd-8.4_ed6" switches to the new augment API, but the new API requires that the tree is augmented before rb_insert_augmented() is called, which is missing. So we add the augment-code to drbd_insert_interval() when it travels the tree up to down before rb_insert_augmented(). See the example in include/linux/interval_tree_generic.h or Documentation/rbtree.txt. drbd_insert_interval() may cancel the insertion when traveling, in this case, the just added augment-code does nothing before cancel since the @this node is already in the subtrees in this case. CC: Michel Lespinasse CC: stable@kernel.org # v3.10+ Signed-off-by: Lai Jiangshan Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner Signed-off-by: Jens Axboe --- Reading git-diff-tree failed