[CRIU] [PATCH v6 13/13] tty: Optimize dependencies check
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Jan 18 03:59:22 PST 2017
Iterate over currently unrestored files only.
v4: New
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
criu/tty.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/criu/tty.c b/criu/tty.c
index 08dad1cb6..d225b0307 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -1099,12 +1099,12 @@ static int open_ext_tty(struct tty_info *info)
static bool tty_deps_restored(struct tty_info *info)
{
- struct list_head *list = &rsti(current)->used;
+ struct list_head *list = &rsti(current)->fds;
struct fdinfo_list_entry *fle;
struct tty_info *tmp;
if (info->driver->type == TTY_TYPE__CTTY) {
- list_for_each_entry(fle, list, used_list) {
+ list_for_each_entry(fle, list, ps_list) {
if (fle->desc->ops->type != FD_TYPES__TTY || fle->desc == &info->d)
continue;
@@ -1113,7 +1113,7 @@ static bool tty_deps_restored(struct tty_info *info)
return false;
}
} else if (!tty_is_master(info)) {
- list_for_each_entry(fle, list, used_list) {
+ list_for_each_entry(fle, list, ps_list) {
if (fle->desc->ops->type != FD_TYPES__TTY || fle->desc == &info->d)
continue;
tmp = container_of(fle->desc, struct tty_info, d);
More information about the CRIU
mailing list