2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

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: Tikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Tikhomirov Pavel
2014-02-19 15:05:00 +04:00
committed by Pavel Emelyanov
parent b742c125fb
commit 3fdfbe20dd

View File

@@ -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
* to exist in parent (either pagemap or hole)
*/
{
xfer->parent = NULL;
if (fd_type == CR_FD_PAGEMAP) {
int ret;
int pfd;
xfer->parent = NULL;
pfd = openat(get_service_fd(IMG_FD_OFF), CR_PARENT_LINK, O_RDONLY);
if (pfd < 0 && errno == ENOENT)
goto out;