aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2018-07-02 10:58:34 +0800
committerMax Reitz <mreitz@redhat.com>2018-07-09 19:43:24 +0200
commit9f850f67adc8d8b333cceae023a6462e184848cd (patch)
tree867be5fe9392de5e2abb80e907e7a15e4c84a180 /block
parent148546c8222e922c5dcc652b81cb97ea2ad4fd5b (diff)
file-posix: Fix fd_open check in raw_co_copy_range_to
One of them is a typo. But update both to be more readable. Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 20180702025836.20957-3-famz@redhat.com Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/file-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/file-posix.c b/block/file-posix.c
index 98987b80f1..349f77a3af 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2611,7 +2611,7 @@ static int coroutine_fn raw_co_copy_range_to(BlockDriverState *bs,
}
src_s = src->bs->opaque;
- if (fd_open(bs) < 0 || fd_open(bs) < 0) {
+ if (fd_open(src->bs) < 0 || fd_open(dst->bs) < 0) {
return -EIO;
}
return paio_submit_co_full(bs, src_s->fd, src_offset, s->fd, dst_offset,