[CRIU] [PATCH 6/9] mounts: enumirate mounts bellow specified element
Andrey Vagin
avagin at openvz.org
Tue Jul 9 07:05:53 EDT 2013
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
mount.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mount.c b/mount.c
index 31b1f3c..0609ded 100644
--- a/mount.c
+++ b/mount.c
@@ -533,7 +533,9 @@ int dump_mnt_ns(int ns_pid, struct cr_fdset *fdset)
return 0;
}
-#define MNT_TREE_WALK(_mi, _el, _fn_f, _fn_r) do { \
+#define MNT_TREE_WALK(_r, _el, _fn_f, _fn_r) do { \
+ struct mount_info *_mi = _r; \
+ \
while (1) { \
if (_fn_f(_mi)) \
return -1; \
@@ -545,7 +547,7 @@ int dump_mnt_ns(int ns_pid, struct cr_fdset *fdset)
up: \
if (_fn_r(_mi)) \
return -1; \
- if (_mi->parent == NULL) \
+ if (_mi == _r) \
return 0; \
if (_mi->siblings._el == &_mi->parent->children) { \
_mi = _mi->parent; \
--
1.8.3.1
More information about the CRIU
mailing list