[CRIU] [PATCH 3/4] autofs: Use files.c version of find_used_fd
Pavel Emelyanov
xemul at virtuozzo.com
Thu Feb 16 04:11:43 PST 2017
Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
criu/autofs.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/criu/autofs.c b/criu/autofs.c
index 0ba99fc..5dfe0c6 100644
--- a/criu/autofs.c
+++ b/criu/autofs.c
@@ -828,17 +828,6 @@ static autofs_info_t *autofs_create_info(const struct mount_info *mi,
return i;
}
-static struct fdinfo_list_entry *find_fle_by_fd(struct list_head *head, int fd)
-{
- struct fdinfo_list_entry *fle;
-
- list_for_each_entry(fle, head, used_list) {
- if (fle->fe->fd == fd)
- return fle;
- }
- return NULL;
-}
-
static struct fdinfo_list_entry *autofs_pipe_le(struct pstree_item *master,
AutofsEntry *entry)
{
@@ -848,7 +837,7 @@ static struct fdinfo_list_entry *autofs_pipe_le(struct pstree_item *master,
if (entry->has_read_fd)
pipe_fd = entry->read_fd;
- ple = find_fle_by_fd(&rsti(master)->used, pipe_fd);
+ ple = find_used_fd(master, pipe_fd);
if (!ple) {
pr_err("Failed to find pipe fd %d in process %d\n",
pipe_fd, master->pid->ns[0].virt);
--
2.5.0
More information about the CRIU
mailing list