Commit 3fdfbe20 authored by Tikhomirov Pavel's avatar Tikhomirov Pavel Committed by Pavel Emelyanov

page-xfer: bug, don't open page-read for shmem

it was error if come to that point from shmem.c
388L: err = open_page_xfer(&xfer, CR_FD_SHMEM_PAGEMAP, si->shmid);
Signed-off-by: 's avatarTikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b742c125
...@@ -641,12 +641,11 @@ static int open_page_local_xfer(struct page_xfer *xfer, int fd_type, long id) ...@@ -641,12 +641,11 @@ static int open_page_local_xfer(struct page_xfer *xfer, int fd_type, long id)
* 2) when writing a hole, the respective place would be checked * 2) when writing a hole, the respective place would be checked
* to exist in parent (either pagemap or hole) * to exist in parent (either pagemap or hole)
*/ */
{ xfer->parent = NULL;
if (fd_type == CR_FD_PAGEMAP) {
int ret; int ret;
int pfd; int pfd;
xfer->parent = NULL;
pfd = openat(get_service_fd(IMG_FD_OFF), CR_PARENT_LINK, O_RDONLY); pfd = openat(get_service_fd(IMG_FD_OFF), CR_PARENT_LINK, O_RDONLY);
if (pfd < 0 && errno == ENOENT) if (pfd < 0 && errno == ENOENT)
goto out; goto out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment