Commit 2c500de8 authored by Pavel Emelyanov's avatar Pavel Emelyanov

criu: Remove parent-img service fd

It's no longer needed. All parent manipulations are done in-place
using CR_PARENT_LINK name.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent bfc2895f
...@@ -244,26 +244,14 @@ int open_image_dir(char *dir) ...@@ -244,26 +244,14 @@ int open_image_dir(char *dir)
fd = ret; fd = ret;
if (opts.img_parent) { if (opts.img_parent) {
int pfd;
ret = symlinkat(opts.img_parent, fd, CR_PARENT_LINK); ret = symlinkat(opts.img_parent, fd, CR_PARENT_LINK);
if (ret < 0) { if (ret < 0 && errno != EEXIST) {
pr_perror("Can't link parent snapshot"); pr_perror("Can't link parent snapshot");
goto err; goto err;
} }
pfd = openat(fd, CR_PARENT_LINK, O_RDONLY);
if (pfd < 0) {
pr_perror("Can't open parent snapshot");
goto err;
} }
ret = install_service_fd(PARENT_FD_OFF, pfd); return 0;
close(pfd);
}
return ret;
err: err:
close_image_dir(); close_image_dir();
......
...@@ -11,7 +11,6 @@ enum sfd_type { ...@@ -11,7 +11,6 @@ enum sfd_type {
PROC_FD_OFF, /* fd with /proc for all proc_ calls */ PROC_FD_OFF, /* fd with /proc for all proc_ calls */
CTL_TTY_OFF, CTL_TTY_OFF,
SELF_STDIN_OFF, SELF_STDIN_OFF,
PARENT_FD_OFF,
CR_PROC_FD_OFF, /* some other's proc fd. CR_PROC_FD_OFF, /* some other's proc fd.
* For dump -- target ns' proc * For dump -- target ns' proc
* For restore -- CRIU ns' proc * For restore -- CRIU ns' proc
......
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