So follow up command in this batch that update the set assume this element is already in the kernel. Fixes: 3da9643fb9ff ("intervals: add support to automerge with kernel elements") Fixes: 3ed9fadaab95 ("intervals: build list of elements to be added from cache") Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- src/intervals.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intervals.c b/src/intervals.c index 584c69d5189b..a74238525d8d 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -244,6 +244,7 @@ int set_automerge(struct list_head *msgs, struct cmd *cmd, struct set *set, i->key->left->value, i->key->right->value); } clone = expr_clone(i); + clone->flags |= EXPR_F_KERNEL; list_add_tail(&clone->list, &existing_set->init->expressions); } } @@ -481,6 +482,7 @@ int set_delete(struct list_head *msgs, struct cmd *cmd, struct set *set, if (!(i->flags & EXPR_F_KERNEL)) { clone = expr_clone(i); list_add_tail(&clone->list, &add->expressions); + i->flags |= EXPR_F_KERNEL; } } @@ -609,6 +611,7 @@ int set_overlap(struct list_head *msgs, struct set *set, struct expr *init) list_move_tail(&i->list, &existing_set->init->expressions); else if (existing_set) { clone = expr_clone(i); + clone->flags |= EXPR_F_KERNEL; list_add_tail(&clone->list, &existing_set->init->expressions); } } -- 2.30.2