mount-util: use mount beneath to replace previous namespace mount

Instead of mounting over, do an atomic swap using mount beneath, if
available. This way assets can be mounted again and again (e.g.:
updates) without leaking mounts.
This commit is contained in:
Luca Boccassi
2023-10-16 14:33:47 +01:00
committed by Luca Boccassi
parent f5e6f3117c
commit 7c83d42ef8
9 changed files with 109 additions and 41 deletions
+4
View File
@@ -539,6 +539,10 @@ static inline int missing_open_tree(
/* ======================================================================= */
#ifndef MOVE_MOUNT_BENEATH
#define MOVE_MOUNT_BENEATH 0x00000200
#endif
#if !HAVE_MOVE_MOUNT
#ifndef MOVE_MOUNT_F_EMPTY_PATH