From fba9898fd5b1d20a2ed350b7b542d9f8a3597a0c Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Wed, 23 Nov 2022 15:41:57 +0900 Subject: [PATCH] lsfd: collect namespace files after collecting information about "nodev" fs In my plan, lsfd will need the information of the backing device for "nsfs" file system before collecing the information about th namespaces associated with fds. Signed-off-by: Masatake YAMATO --- misc-utils/lsfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc-utils/lsfd.c b/misc-utils/lsfd.c index a7e88aea4c..2e2728791b 100644 --- a/misc-utils/lsfd.c +++ b/misc-utils/lsfd.c @@ -1279,8 +1279,6 @@ static void read_process(struct lsfd_control *ctl, struct path_cxt *pc, || kcmp(proc->leader->pid, proc->pid, KCMP_FS, 0, 0) != 0) collect_fs_files(pc, proc); - collect_namespace_files(pc, proc); - if (proc->ns_mnt == 0 || !has_mnt_ns(proc->ns_mnt)) { FILE *mnt = ul_path_fopen(pc, "r", "mountinfo"); if (mnt) { @@ -1291,6 +1289,8 @@ static void read_process(struct lsfd_control *ctl, struct path_cxt *pc, } } + collect_namespace_files(pc, proc); + /* If kcmp is not available, * there is no way to no whether threads share resources. * In such cases, we must pay the costs: call collect_mem_files() -- 2.47.3