Commit ba8671b4 authored by Pavel Emelyanov's avatar Pavel Emelyanov

files: Split open_reg_by_id into two parts

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9b91bf39
...@@ -815,6 +815,11 @@ static int do_open_reg(int ns_root_fd, struct reg_file_info *rfi, void *arg) ...@@ -815,6 +815,11 @@ static int do_open_reg(int ns_root_fd, struct reg_file_info *rfi, void *arg)
return fd; return fd;
} }
int open_reg_fd(struct file_desc *fd)
{
return open_path(fd, do_open_reg_noseek, NULL);
}
int open_reg_by_id(u32 id) int open_reg_by_id(u32 id)
{ {
struct file_desc *fd; struct file_desc *fd;
...@@ -831,7 +836,7 @@ int open_reg_by_id(u32 id) ...@@ -831,7 +836,7 @@ int open_reg_by_id(u32 id)
return -1; return -1;
} }
return open_path(fd, do_open_reg_noseek, NULL); return open_reg_fd(fd);
} }
int get_filemap_fd(struct vma_area *vma) int get_filemap_fd(struct vma_area *vma)
......
...@@ -26,6 +26,7 @@ struct reg_file_info { ...@@ -26,6 +26,7 @@ struct reg_file_info {
}; };
extern int open_reg_by_id(u32 id); extern int open_reg_by_id(u32 id);
extern int open_reg_fd(struct file_desc *);
extern int open_path(struct file_desc *, int (*open_cb)(int ns_root_fd, extern int open_path(struct file_desc *, int (*open_cb)(int ns_root_fd,
struct reg_file_info *, void *), void *arg); struct reg_file_info *, void *), void *arg);
extern void clear_ghost_files(void); extern void clear_ghost_files(void);
......
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