diff mbox series

[2/4] file-posix: Fix fd_open check in raw_co_copy_range_to

Message ID 20180702025836.20957-3-famz@redhat.com
State New
Headers show
Series block: Trivial fixes in offloading code | expand

Commit Message

Fam Zheng July 2, 2018, 2:58 a.m. UTC
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>
---
 block/file-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/block/file-posix.c b/block/file-posix.c
index 829ee538d8..e04e464e72 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2600,7 +2600,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,