From: Masatake YAMATO Date: Wed, 23 Nov 2022 06:41:57 +0000 (+0900) Subject: lsfd: collect namespace files after collecting information about "nodev" fs X-Git-Tag: v2.39-rc1~406^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fba9898fd5b1d20a2ed350b7b542d9f8a3597a0c;p=thirdparty%2Futil-linux.git 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 --- 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()