Skip to content

Commit

Permalink
block: Fix bdrv_is_first_non_filter()
Browse files Browse the repository at this point in the history
Consider top level BlockDriverStates as well.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Tested-by: Benoit Canet <benoit@irqsave.net>
  • Loading branch information
kevmw committed Feb 21, 2014
1 parent a71835a commit e6dc8a1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions block.c
Expand Up @@ -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) {
Expand Down

0 comments on commit e6dc8a1

Please sign in to comment.