OSDN Git Service

stream: Traverse graph after modification
authorHanna Reitz <hreitz@redhat.com>
Mon, 15 Nov 2021 14:53:57 +0000 (15:53 +0100)
committerHanna Reitz <hreitz@redhat.com>
Tue, 16 Nov 2021 08:43:23 +0000 (09:43 +0100)
commit8d3dd037d947ce96c42c376ef0bb5e5c6ef96cbe
tree6bc76340df59b6a5326b0703ec441d66e6074dcf
parent42f6c9179be4401974dd3a75ee72defd16b5092d
stream: Traverse graph after modification

bdrv_cor_filter_drop() modifies the block graph.  That means that other
parties can also modify the block graph before it returns.  Therefore,
we cannot assume that the result of a graph traversal we did before
remains valid afterwards.

We should thus fetch `base` and `unfiltered_base` afterwards instead of
before.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20211111120829.81329-2-hreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20211115145409.176785-2-kwolf@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
block/stream.c