Loading libsparse/backed_block.c +6 −2 Original line number Original line Diff line number Diff line Loading @@ -221,7 +221,8 @@ static int merge_bb(struct backed_block_list *bbl, } } break; break; case BACKED_BLOCK_FILE: case BACKED_BLOCK_FILE: if (a->file.filename != b->file.filename || /* Already make sure b->type is BACKED_BLOCK_FILE */ if (strcmp(a->file.filename, b->file.filename) || a->file.offset + a->len != b->file.offset) { a->file.offset + a->len != b->file.offset) { return -EINVAL; return -EINVAL; } } Loading Loading @@ -279,7 +280,10 @@ static int queue_bb(struct backed_block_list *bbl, struct backed_block *new_bb) } } merge_bb(bbl, new_bb, new_bb->next); merge_bb(bbl, new_bb, new_bb->next); merge_bb(bbl, bb, new_bb); if (!merge_bb(bbl, bb, new_bb)) { /* new_bb destroyed, point to retained as last_used */ bbl->last_used = bb; } return 0; return 0; } } Loading Loading
libsparse/backed_block.c +6 −2 Original line number Original line Diff line number Diff line Loading @@ -221,7 +221,8 @@ static int merge_bb(struct backed_block_list *bbl, } } break; break; case BACKED_BLOCK_FILE: case BACKED_BLOCK_FILE: if (a->file.filename != b->file.filename || /* Already make sure b->type is BACKED_BLOCK_FILE */ if (strcmp(a->file.filename, b->file.filename) || a->file.offset + a->len != b->file.offset) { a->file.offset + a->len != b->file.offset) { return -EINVAL; return -EINVAL; } } Loading Loading @@ -279,7 +280,10 @@ static int queue_bb(struct backed_block_list *bbl, struct backed_block *new_bb) } } merge_bb(bbl, new_bb, new_bb->next); merge_bb(bbl, new_bb, new_bb->next); merge_bb(bbl, bb, new_bb); if (!merge_bb(bbl, bb, new_bb)) { /* new_bb destroyed, point to retained as last_used */ bbl->last_used = bb; } return 0; return 0; } } Loading