diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2014-09-18 16:49:41 +0200 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2014-11-17 14:11:43 +0000 |
commit | 51edc20fc062b2f4c1782059d7f742880fd4f06e (patch) | |
tree | 26eb2e45df7bc3fb3c501b438457165d6dd99489 /block | |
parent | 397c6bba5bcc9d0f779e536e8171c73e030ddf7f (diff) | |
download | linux-stable-51edc20fc062b2f4c1782059d7f742880fd4f06e.tar.gz linux-stable-51edc20fc062b2f4c1782059d7f742880fd4f06e.tar.bz2 linux-stable-51edc20fc062b2f4c1782059d7f742880fd4f06e.zip |
drbd: compute the end before rb_insert_augmented()
commit 82cfb90bc99d7b7e0ec62d0505b9d4f06805d5db upstream.
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 <walken@google.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions