When expanding the root node, be sure to only add a pivot at 0 if there
was a previous value, otherwise add a pivot for one less than the
pending insert.
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
* rcu_assign is not necessary as readers are not able to access this
* node.
*/
- RCU_INIT_POINTER(mn->map64.slot[0], r_entry);
- mn->map64.pivot[0] = 1;
+ if (r_entry != NULL) {
+ RCU_INIT_POINTER(mn->map64.slot[0], r_entry);
+ mn->map64.pivot[0] = 1;
+ } else {
+ mn->map64.pivot[0] = ms->index;
+ }
ms->slot_idx = 1;