2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-04 00:05:26 +00:00

files: Kill file_desc_ops::want_transport()

Since transport fd is per-task, this method is not need anymore.
Kill it.

travis-ci: success for Rework file opening scheme to make it asynchronous (rev5)
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Kirill Tkhai
2016-12-26 17:25:58 +03:00
committed by Pavel Emelyanov
parent 9cb52afff4
commit 2f2e46c04b
4 changed files with 0 additions and 31 deletions

View File

@@ -102,11 +102,6 @@ struct file_desc_ops {
* and with the fd being the "restored" one.
*/
int (*post_open)(struct file_desc *d, int fd);
/*
* Report whether the fd in question wants a transport socket
* in it instead of a real file. See file_master for details.
*/
int (*want_transport)(FdinfoEntry *fe, struct file_desc *d);
/*
* Called to collect a new fd before adding it on desc. Clients
* may chose to collect it to some specific rst_info list. See

View File

@@ -327,18 +327,9 @@ out:
return tmp;
}
static int want_transport(FdinfoEntry *fe, struct file_desc *d)
{
struct pipe_info *pi;
pi = container_of(d, struct pipe_info, d);
return !pi->create;
}
static struct file_desc_ops pipe_desc_ops = {
.type = FD_TYPES__PIPE,
.open = open_pipe,
.want_transport = want_transport,
.name = pipe_d_name,
};

View File

@@ -1034,15 +1034,6 @@ done:
return ret;
}
static int unixsk_should_open_transport(FdinfoEntry *fe,
struct file_desc *d)
{
struct unix_sk_info *ui;
ui = container_of(d, struct unix_sk_info, d);
return ui->flags & USK_PAIR_SLAVE;
}
static int open_unixsk_pair_master(struct unix_sk_info *ui)
{
int sk[2];
@@ -1293,7 +1284,6 @@ static struct file_desc_ops unix_desc_ops = {
.type = FD_TYPES__UNIXSK,
.open = open_unix_sk,
.post_open = post_open_unix_sk,
.want_transport = unixsk_should_open_transport,
.name = socket_d_name,
};

View File

@@ -1108,12 +1108,6 @@ static int tty_open(struct file_desc *d)
return info->driver->open(info);
}
static int tty_transport(FdinfoEntry *fe, struct file_desc *d)
{
struct tty_info *info = container_of(d, struct tty_info, d);
return !info->create;
}
static void tty_collect_fd(struct file_desc *d, struct fdinfo_list_entry *fle,
struct rst_info *ri)
{
@@ -1150,7 +1144,6 @@ static struct file_desc_ops tty_desc_ops = {
.type = FD_TYPES__TTY,
.open = tty_open,
.post_open = tty_restore_ctl_terminal,
.want_transport = tty_transport,
.collect_fd = tty_collect_fd,
.name = tty_d_name,
};