Am 10.11.2015 um 04:27 hat Max Reitz geschrieben: > Every entry in this list should be a root BDS and as such either be > anchored to a BlockBackend or be owned by the monitor. > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block.c | 30 +----------------------------- > blockdev.c | 8 -------- > include/block/block.h | 1 - > include/block/block_int.h | 4 ---- > 4 files changed, 1 insertion(+), 42 deletions(-)
> void bdrv_make_anon(BlockDriverState *bs) > { > - /* > - * Take care to remove bs from bdrv_states only when it's actually > - * in it. Note that bs->device_list.tqe_prev is initially null, > - * and gets set to non-null by QTAILQ_INSERT_TAIL(). Establish > - * the useful invariant "bs in bdrv_states iff bs->tqe_prev" by > - * resetting it to null on remove. > - */ > - if (bs->device_list.tqe_prev) { > - QTAILQ_REMOVE(&bdrv_states, bs, device_list); > - bs->device_list.tqe_prev = NULL; > - } > if (bs->node_name[0] != '\0') { > QTAILQ_REMOVE(&graph_bdrv_states, bs, node_list); > } bdrv_make_anon() has only a single user at this point and the remaining part after this patch is so small that we could consider inlining it. Kevin