[CRIU] [PATCH v5 09/33] files: Kill file_desc_ops::want_transport()
Kirill Tkhai
ktkhai at virtuozzo.com
Mon Dec 26 06:25:58 PST 2016
Since transport fd is per-task, this method is not need anymore.
Kill it.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
criu/include/files.h | 5 -----
criu/pipes.c | 9 ---------
criu/sk-unix.c | 10 ----------
criu/tty.c | 7 -------
4 files changed, 31 deletions(-)
diff --git a/criu/include/files.h b/criu/include/files.h
index 07d6f94b7..57190049d 100644
--- a/criu/include/files.h
+++ b/criu/include/files.h
@@ -103,11 +103,6 @@ struct file_desc_ops {
*/
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
* prepare_fds() for details.
diff --git a/criu/pipes.c b/criu/pipes.c
index a4556f84b..08dd7d19e 100644
--- a/criu/pipes.c
+++ b/criu/pipes.c
@@ -327,18 +327,9 @@ static int open_pipe(struct file_desc *d)
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,
};
diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index 752c21232..1231d5692 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1034,15 +1034,6 @@ static int bind_unix_sk(int sk, struct unix_sk_info *ui)
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,
};
diff --git a/criu/tty.c b/criu/tty.c
index ffb000cc6..97443e85e 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -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,
};
More information about the CRIU
mailing list