[CRIU] [PATCH 3/4] files: Drop redundant find_file_desc wrapper
Cyrill Gorcunov
gorcunov at openvz.org
Sat Jun 9 04:17:02 EDT 2012
Such wrapping makes code more vague since
the find_file_desc_raw is more descriptive.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
files.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/files.c b/files.c
index 4b3c30a..09b921b 100644
--- a/files.c
+++ b/files.c
@@ -71,11 +71,6 @@ struct file_desc *find_file_desc_raw(int type, u32 id)
return NULL;
}
-static inline struct file_desc *find_file_desc(struct fdinfo_entry *fe)
-{
- return find_file_desc_raw(fe->type, fe->id);
-}
-
struct fdinfo_list_entry *file_master(struct file_desc *d)
{
BUG_ON(list_empty(&d->fd_info_head));
@@ -356,7 +351,7 @@ static int collect_fd(int pid, struct fdinfo_entry *e, struct rst_info *rst_info
futex_init(&le->real_pid);
le->fe = *e;
- fdesc = find_file_desc(e);
+ fdesc = find_file_desc_raw(e->type, e->id);
if (fdesc == NULL) {
pr_err("No file for fd %d id %d\n", e->fd, e->id);
return -1;
@@ -646,7 +641,7 @@ static int open_fdinfo(int pid, struct fdinfo_entry *fe, int state)
BUG_ON(state >= FD_STATE_MAX);
- fdesc = find_file_desc(fe);
+ fdesc = find_file_desc_raw(fe->type, fe->id);
pr_info("\tRestoring fd %d (state -> %s)\n", fe->fd, fdinfo_states[state]);
switch (state) {
--
1.7.7.6
More information about the CRIU
mailing list