diff options
author | Kevin Wolf <kwolf@redhat.com> | 2014-02-04 11:45:31 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-02-21 21:02:21 +0100 |
commit | e6dc8a1f83835054fcaf1dcb41af7c868688c068 (patch) | |
tree | 75ea34c8067aa17530bdc5faf06b6d4f44b8c534 | |
parent | a71835a0ccff168b19ffc9656fe27988821ec59a (diff) |
block: Fix bdrv_is_first_non_filter()
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>
-rw-r--r-- | block.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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) { |