Commit 04800b6e authored by Pavel Emelyanov's avatar Pavel Emelyanov

files: Rename fdinfo_list_entry's list to desc_list

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9829dbfd
...@@ -76,7 +76,7 @@ struct fdinfo_list_entry *file_master(struct file_desc *d) ...@@ -76,7 +76,7 @@ struct fdinfo_list_entry *file_master(struct file_desc *d)
{ {
BUG_ON(list_empty(&d->fd_info_head)); BUG_ON(list_empty(&d->fd_info_head));
return list_first_entry(&d->fd_info_head, return list_first_entry(&d->fd_info_head,
struct fdinfo_list_entry, list); struct fdinfo_list_entry, desc_list);
} }
struct reg_file_info { struct reg_file_info {
...@@ -97,7 +97,7 @@ void show_saved_files(void) ...@@ -97,7 +97,7 @@ void show_saved_files(void)
struct fdinfo_list_entry *le; struct fdinfo_list_entry *le;
pr_info(" `- type %d ID 0x%x\n", fd->type, fd->id); pr_info(" `- type %d ID 0x%x\n", fd->type, fd->id);
list_for_each_entry(le, &fd->fd_info_head, list) list_for_each_entry(le, &fd->fd_info_head, desc_list)
pr_info(" `- FD %d pid %d\n", le->fd, le->pid); pr_info(" `- FD %d pid %d\n", le->fd, le->pid);
} }
} }
...@@ -350,11 +350,11 @@ static int collect_fd(int pid, struct fdinfo_entry *e) ...@@ -350,11 +350,11 @@ static int collect_fd(int pid, struct fdinfo_entry *e)
return -1; return -1;
} }
list_for_each_entry(l, &fdesc->fd_info_head, list) list_for_each_entry(l, &fdesc->fd_info_head, desc_list)
if (l->pid > le->pid) if (l->pid > le->pid)
break; break;
list_add_tail(&le->list, &l->list); list_add_tail(&le->desc_list, &l->desc_list);
return 0; return 0;
} }
...@@ -483,11 +483,11 @@ static int open_transport_fd(int pid, struct fdinfo_entry *fe, struct file_desc ...@@ -483,11 +483,11 @@ static int open_transport_fd(int pid, struct fdinfo_entry *fe, struct file_desc
pr_info("\t%d: Create transport fd for %d\n", pid, fe->fd); pr_info("\t%d: Create transport fd for %d\n", pid, fe->fd);
list_for_each_entry(fle, &d->fd_info_head, list) list_for_each_entry(fle, &d->fd_info_head, desc_list)
if ((fle->pid == pid) && (fle->fd == fe->fd)) if ((fle->pid == pid) && (fle->fd == fe->fd))
break; break;
BUG_ON(&d->fd_info_head == &fle->list); BUG_ON(&d->fd_info_head == &fle->desc_list);
sock = socket(PF_UNIX, SOCK_DGRAM, 0); sock = socket(PF_UNIX, SOCK_DGRAM, 0);
if (sock < 0) { if (sock < 0) {
...@@ -551,7 +551,7 @@ static int open_fd(int pid, struct fdinfo_entry *fe, ...@@ -551,7 +551,7 @@ static int open_fd(int pid, struct fdinfo_entry *fe,
pr_info("\t%d: Create fd for %d\n", pid, fe->fd); pr_info("\t%d: Create fd for %d\n", pid, fe->fd);
list_for_each_entry(fle, &d->fd_info_head, list) { list_for_each_entry(fle, &d->fd_info_head, desc_list) {
if (pid == fle->pid) { if (pid == fle->pid) {
pr_info("\t\tGoing to dup %d into %d\n", fe->fd, fle->fd); pr_info("\t\tGoing to dup %d into %d\n", fe->fd, fle->fd);
if (fe->fd == fle->fd) if (fe->fd == fle->fd)
......
...@@ -28,7 +28,7 @@ enum fdinfo_states { ...@@ -28,7 +28,7 @@ enum fdinfo_states {
}; };
struct fdinfo_list_entry { struct fdinfo_list_entry {
struct list_head list; struct list_head desc_list;
int fd; int fd;
int pid; int pid;
int flags; int flags;
......
...@@ -86,7 +86,7 @@ static void show_saved_pipe_fds(struct pipe_info *pi) ...@@ -86,7 +86,7 @@ static void show_saved_pipe_fds(struct pipe_info *pi)
struct fdinfo_list_entry *fle; struct fdinfo_list_entry *fle;
pr_info(" `- ID %p 0x%xpn", pi, pi->pe.id); pr_info(" `- ID %p 0x%xpn", pi, pi->pe.id);
list_for_each_entry(fle, &pi->d.fd_info_head, list) list_for_each_entry(fle, &pi->d.fd_info_head, desc_list)
pr_info(" `- FD %d pid %d\n", fle->fd, fle->pid); pr_info(" `- FD %d pid %d\n", fle->fd, fle->pid);
} }
......
...@@ -1526,7 +1526,7 @@ int resolve_unix_peers(void) ...@@ -1526,7 +1526,7 @@ int resolve_unix_peers(void)
pr_info("\t0x%x -> 0x%x (0x%x) flags 0x%x\n", ui->ue.id, ui->ue.peer, pr_info("\t0x%x -> 0x%x (0x%x) flags 0x%x\n", ui->ue.id, ui->ue.peer,
ui->peer ? ui->peer->ue.id : 0, ui->flags); ui->peer ? ui->peer->ue.id : 0, ui->flags);
list_for_each_entry(fle, &ui->d.fd_info_head, list) list_for_each_entry(fle, &ui->d.fd_info_head, desc_list)
pr_info("\t\tfd %d in pid %d\n", pr_info("\t\tfd %d in pid %d\n",
fle->fd, fle->pid); fle->fd, fle->pid);
......
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