diff options
Diffstat (limited to 'block/blklogwrites.c')
-rw-r--r-- | block/blklogwrites.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/block/blklogwrites.c b/block/blklogwrites.c index e3c6c40..12b4c3c 100644 --- a/block/blklogwrites.c +++ b/block/blklogwrites.c @@ -155,11 +155,8 @@ static int blk_log_writes_open(BlockDriverState *bs, QDict *options, int flags, } /* Open the file */ - bs->file = bdrv_open_child(NULL, options, "file", bs, &child_of_bds, - BDRV_CHILD_FILTERED | BDRV_CHILD_PRIMARY, false, - errp); - if (!bs->file) { - ret = -EINVAL; + ret = bdrv_open_file_child(NULL, options, "file", bs, errp); + if (ret < 0) { goto fail; } |