The codes that fixup the right leaf and the codes that dirty the
extnet buffer use the variable 'right_nritems' ,  both of them expect
'right_nritems' is the number of items in right leaf after the push.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
                              btrfs_item_nr_offset(push_items),
                             (btrfs_header_nritems(right) - push_items) *
                             sizeof(struct btrfs_item));
-
        }
-       btrfs_set_header_nritems(right, right_nritems - push_items);
+       right_nritems -= push_items;
+       btrfs_set_header_nritems(right, right_nritems);
        push_space = BTRFS_LEAF_DATA_SIZE(root);
-
        for (i = 0; i < right_nritems; i++) {
                item = btrfs_item_nr(right, i);