mount-util: use modern mount_setattr() syscall for bind_remount_one_with_mountinfo()

New kernels have a nice syscall for changing bind mount flags. Let's use
it. This makes the complex libmount based iteration logic unnecessary.
This commit is contained in:
Lennart Poettering
2021-10-25 10:41:26 +02:00
parent 6dbfbc4667
commit 4f5644dba6
3 changed files with 51 additions and 0 deletions
+8
View File
@@ -465,10 +465,18 @@ struct mount_attr;
#define MOUNT_ATTR_IDMAP 0x00100000
#endif
#ifndef MOUNT_ATTR_NOSYMFOLLOW
#define MOUNT_ATTR_NOSYMFOLLOW 0x00200000
#endif
#ifndef AT_RECURSIVE
#define AT_RECURSIVE 0x8000
#endif
#ifndef MOUNT_ATTR_SIZE_VER0
#define MOUNT_ATTR_SIZE_VER0 32
#endif
static inline int missing_mount_setattr(
int dfd,
const char *path,