From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZp3H-0001Fn-Qe for qemu-devel@nongnu.org; Sun, 01 Jul 2018 22:59:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZp3H-0001dQ-6Y for qemu-devel@nongnu.org; Sun, 01 Jul 2018 22:58:55 -0400 From: Fam Zheng Date: Mon, 2 Jul 2018 10:58:34 +0800 Message-Id: <20180702025836.20957-3-famz@redhat.com> In-Reply-To: <20180702025836.20957-1-famz@redhat.com> References: <20180702025836.20957-1-famz@redhat.com> Subject: [Qemu-devel] [PATCH 2/4] file-posix: Fix fd_open check in raw_co_copy_range_to List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Max Reitz , qemu-block@nongnu.org One of them is a typo. But update both to be more readable. Reported-by: Kevin Wolf Signed-off-by: Fam Zheng --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.17.1