@@ -84,7 +84,6 @@ struct pstree_item *pstree_item_by_real(pid_t virt);
struct pstree_item *pstree_item_by_virt(pid_t virt);
extern int pid_to_virt(pid_t pid);
-extern bool pid_in_pstree(pid_t pid);
struct task_entries;
extern struct task_entries *task_entries;
@@ -1932,6 +1932,11 @@ static int parse_file_lock_buf(char *buf, struct file_lock *fl,
return 0;
}
+static bool pid_in_pstree(pid_t pid)
+{
+ return pstree_item_by_real(pid) != NULL;
+}
+
int parse_file_locks(void)
{
struct file_lock *fl;
@@ -1046,8 +1046,3 @@ int pid_to_virt(pid_t real)
return item->pid.virt;
return 0;
}
-
-bool pid_in_pstree(pid_t pid)
-{
- return pstree_item_by_real(pid) != NULL;
-}
This code is for older kernels that don't have locks info in fdinfo files. So don't keep global pstree helper for this. Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> --- criu/include/pstree.h | 1 - criu/proc_parse.c | 5 +++++ criu/pstree.c | 5 ----- 3 files changed, 5 insertions(+), 6 deletions(-)