[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] block: make bdrv_drop_intermediate() less wrong
From: |
Alberto Garcia |
Subject: |
Re: [PATCH 1/2] block: make bdrv_drop_intermediate() less wrong |
Date: |
Thu, 05 Nov 2020 16:14:26 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Sat 31 Oct 2020 01:35:01 PM CET, Vladimir Sementsov-Ogievskiy wrote:
> - QLIST_FOREACH_SAFE(c, &top->parents, next_parent, next) {
/* ... */
> + QLIST_FOREACH_SAFE(c, &base->parents, next_parent, next) {
I also wonder, is top->parents and base->parents guaranteed to be the
same list in this case?
If not you could store the list of top->parents before calling
bdrv_replace_node() and use it afterwards.
QLIST_FOREACH(c, &top->parents, next_parent) {
parents = g_slist_prepend(parents, c);
}
Berto