From e6dc8a1f83835054fcaf1dcb41af7c868688c068 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 4 Feb 2014 11:45:31 +0100 Subject: [PATCH] block: Fix bdrv_is_first_non_filter() Consider top level BlockDriverStates as well. Signed-off-by: Kevin Wolf Reviewed-by: Benoit Canet Tested-by: Benoit Canet --- block.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/block.c b/block.c index 6f4bacaa58..034e1ab04d 100644 --- a/block.c +++ b/block.c @@ -5416,11 +5416,7 @@ bool bdrv_is_first_non_filter(BlockDriverState *candidate) QTAILQ_FOREACH(bs, &bdrv_states, device_list) { bool perm; - if (!bs->file) { - continue; - } - - perm = bdrv_recurse_is_first_non_filter(bs->file, candidate); + perm = bdrv_recurse_is_first_non_filter(bs, candidate); /* candidate is the first non filter */ if (perm) { -- GitLab