Lines Matching full:left
98 /* overlaps with the left side of the clearing range */
125 struct xbitmap64_node *left; in xbitmap64_set() local
131 left = xbitmap64_tree_iter_first(&bitmap->xb_root, start, last); in xbitmap64_set()
132 if (left && left->bn_start <= start && left->bn_last >= last) in xbitmap64_set()
140 /* Do we have a left-adjacent extent? */ in xbitmap64_set()
141 left = xbitmap64_tree_iter_first(&bitmap->xb_root, start - 1, start - 1); in xbitmap64_set()
142 ASSERT(!left || left->bn_last + 1 == start); in xbitmap64_set()
148 if (left && right) { in xbitmap64_set()
149 /* combine left and right adjacent extent */ in xbitmap64_set()
150 xbitmap64_tree_remove(left, &bitmap->xb_root); in xbitmap64_set()
152 left->bn_last = right->bn_last; in xbitmap64_set()
153 xbitmap64_tree_insert(left, &bitmap->xb_root); in xbitmap64_set()
155 } else if (left) { in xbitmap64_set()
156 /* combine with left extent */ in xbitmap64_set()
157 xbitmap64_tree_remove(left, &bitmap->xb_root); in xbitmap64_set()
158 left->bn_last = last; in xbitmap64_set()
159 xbitmap64_tree_insert(left, &bitmap->xb_root); in xbitmap64_set()
167 left = kmalloc(sizeof(struct xbitmap64_node), XCHK_GFP_FLAGS); in xbitmap64_set()
168 if (!left) in xbitmap64_set()
170 left->bn_start = start; in xbitmap64_set()
171 left->bn_last = last; in xbitmap64_set()
172 xbitmap64_tree_insert(left, &bitmap->xb_root); in xbitmap64_set()
373 /* overlaps with the left side of the clearing range */
400 struct xbitmap32_node *left; in xbitmap32_set() local
406 left = xbitmap32_tree_iter_first(&bitmap->xb_root, start, last); in xbitmap32_set()
407 if (left && left->bn_start <= start && left->bn_last >= last) in xbitmap32_set()
415 /* Do we have a left-adjacent extent? */ in xbitmap32_set()
416 left = xbitmap32_tree_iter_first(&bitmap->xb_root, start - 1, start - 1); in xbitmap32_set()
417 ASSERT(!left || left->bn_last + 1 == start); in xbitmap32_set()
423 if (left && right) { in xbitmap32_set()
424 /* combine left and right adjacent extent */ in xbitmap32_set()
425 xbitmap32_tree_remove(left, &bitmap->xb_root); in xbitmap32_set()
427 left->bn_last = right->bn_last; in xbitmap32_set()
428 xbitmap32_tree_insert(left, &bitmap->xb_root); in xbitmap32_set()
430 } else if (left) { in xbitmap32_set()
431 /* combine with left extent */ in xbitmap32_set()
432 xbitmap32_tree_remove(left, &bitmap->xb_root); in xbitmap32_set()
433 left->bn_last = last; in xbitmap32_set()
434 xbitmap32_tree_insert(left, &bitmap->xb_root); in xbitmap32_set()
442 left = kmalloc(sizeof(struct xbitmap32_node), XCHK_GFP_FLAGS); in xbitmap32_set()
443 if (!left) in xbitmap32_set()
445 left->bn_start = start; in xbitmap32_set()
446 left->bn_last = last; in xbitmap32_set()
447 xbitmap32_tree_insert(left, &bitmap->xb_root); in xbitmap32_set()