mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
fd: Remove fs_is_special
It's no longer required. All the previously special fds are now scattered over other images. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -227,11 +227,6 @@ int fd_id_generate(pid_t pid, struct fdinfo_entry *fe)
|
||||
struct fd_id_entry *fid;
|
||||
int new_id = 0;
|
||||
|
||||
if (fd_is_special(fe)) {
|
||||
fe->id = fd_id_generate_special();
|
||||
return 1;
|
||||
}
|
||||
|
||||
fid = fd_id_generate_gen(pid, fe, &new_id);
|
||||
if (!fid)
|
||||
return -ENOMEM;
|
||||
|
23
files.c
23
files.c
@@ -216,9 +216,6 @@ int prepare_fd_pid(int pid)
|
||||
if (ret <= 0)
|
||||
break;
|
||||
|
||||
if (fd_is_special(&e))
|
||||
continue;
|
||||
|
||||
ret = collect_fd(pid, &e);
|
||||
if (ret < 0)
|
||||
break;
|
||||
@@ -443,8 +440,6 @@ static int open_fdinfo(int pid, struct fdinfo_entry *fe, int *fdinfo_fd, int sta
|
||||
|
||||
pr_info("\t%d: Got fd for %lx\n", pid, fe->addr);
|
||||
|
||||
BUG_ON(fd_is_special(fe));
|
||||
|
||||
switch (state) {
|
||||
case FD_STATE_PREP:
|
||||
ret = open_transport_fd(pid, fe, fdesc);
|
||||
@@ -460,17 +455,6 @@ static int open_fdinfo(int pid, struct fdinfo_entry *fe, int *fdinfo_fd, int sta
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int open_special_fdinfo(int pid, struct fdinfo_entry *fe,
|
||||
int fdinfo_fd, int state)
|
||||
{
|
||||
if (state != FD_STATE_RECV)
|
||||
return 0;
|
||||
|
||||
pr_info("%d: fe->type: %d\n", pid, fe->type);
|
||||
BUG_ON(1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int prepare_fds(int pid)
|
||||
{
|
||||
u32 type = 0, ret;
|
||||
@@ -499,12 +483,7 @@ int prepare_fds(int pid)
|
||||
if (ret <= 0)
|
||||
break;
|
||||
|
||||
if (fd_is_special(&fe))
|
||||
ret = open_special_fdinfo(pid, &fe,
|
||||
fdinfo_fd, state);
|
||||
else
|
||||
ret = open_fdinfo(pid, &fe, &fdinfo_fd, state);
|
||||
|
||||
ret = open_fdinfo(pid, &fe, &fdinfo_fd, state);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
|
@@ -61,8 +61,6 @@ struct fdinfo_entry {
|
||||
u32 id;
|
||||
} __packed;
|
||||
|
||||
#define fd_is_special(fe) (0)
|
||||
|
||||
struct fs_entry {
|
||||
u32 cwd_id;
|
||||
u32 root_id;
|
||||
|
Reference in New Issue
Block a user