Commit de8fab2e authored by Pavel Emelyanov's avatar Pavel Emelyanov

autofs: Use files.c version of find_used_fd

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent f7862732
...@@ -828,17 +828,6 @@ static autofs_info_t *autofs_create_info(const struct mount_info *mi, ...@@ -828,17 +828,6 @@ static autofs_info_t *autofs_create_info(const struct mount_info *mi,
return i; 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, static struct fdinfo_list_entry *autofs_pipe_le(struct pstree_item *master,
AutofsEntry *entry) AutofsEntry *entry)
{ {
...@@ -848,7 +837,7 @@ static struct fdinfo_list_entry *autofs_pipe_le(struct pstree_item *master, ...@@ -848,7 +837,7 @@ static struct fdinfo_list_entry *autofs_pipe_le(struct pstree_item *master,
if (entry->has_read_fd) if (entry->has_read_fd)
pipe_fd = entry->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) { if (!ple) {
pr_err("Failed to find pipe fd %d in process %d\n", pr_err("Failed to find pipe fd %d in process %d\n",
pipe_fd, vpid(master)); pipe_fd, vpid(master));
......
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