Now that all drivers return the right "file" pointer, we can remove this
check.

Signed-off-by: Fam Zheng <f...@redhat.com>
---
 block/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/io.c b/block/io.c
index 492c291..1ca4e61 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1550,7 +1550,7 @@ static int64_t coroutine_fn 
bdrv_co_get_block_status(BlockDriverState *bs,
         }
     }
 
-    if (bs->file && *file && *file != bs &&
+    if (*file && *file != bs &&
         (ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO) &&
         (ret & BDRV_BLOCK_OFFSET_VALID)) {
         BlockDriverState *file2;
-- 
2.4.3


Reply via email to