[CRIU] [PATCH v6 11/13] mount: copy private field to "bind mount" mount_info structure
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Wed Jan 27 09:57:55 PST 2016
Mount private field can be initialized on actual mount operation, and then
used later with a bind-mount.
Thus, if have to be copied.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
mount.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/mount.c b/mount.c
index a85b5c0..e66d63a 100644
--- a/mount.c
+++ b/mount.c
@@ -2314,6 +2314,13 @@ static int do_bind_mount(struct mount_info *mi)
master = mi->master_id && mi->master_id == mi->bind->master_id;
cut_root = cut_root_for_bind(mi->root, mi->bind->root);
+ /* Mount private can be initialized on mount() callback, which is
+ * called only once.
+ * It have to be copied to all it's sibling structures to provide users
+ * of it with actual data.
+ */
+ mi->private = mi->bind->private;
+
if (list_empty(&mi->bind->children))
mnt_path = mi->bind->mountpoint;
else {
More information about the CRIU
mailing list