hi, The CI in the composefs-rs project picked up an interesting issue with the recent mount API changes in the latest 6.15-rc kernels. I've managed to produce a minimal reproducer. ==> test.sh <== #!/bin/sh set -eux uname -a umount --recursive tmp/mnt || true rm -rf tmp/mnt tmp/new mkdir -p tmp/mnt tmp/new tmp/new/old touch tmp/mnt/this-is-old touch tmp/new/this-is-new ./swapmnt tmp/new tmp/mnt find tmp/mnt ==> swapmnt.c <== // Replace [old] with a clone of [new], moving [old] to [new]/"old" #define _GNU_SOURCE #include <err.h> #include <fcntl.h> #include <linux/mount.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/syscall.h> #include <unistd.h> int main (int argc, char **argv) { if (argc != 3) { fprintf(stderr, "usage: %s [new] [old]", argv[0]); return 1; } const char *new = argv[1]; const char *old = argv[2]; int oldfd = syscall(SYS_open_tree, AT_FDCWD, old, OPEN_TREE_CLONE|OPEN_TREE_CLOEXEC); if (oldfd == -1) err(EXIT_FAILURE, "open_tree('%s', OPEN_TREE_CLONE)", old); int newfd = syscall(SYS_open_tree, AT_FDCWD, new, OPEN_TREE_CLONE|OPEN_TREE_CLOEXEC); if (newfd == -1) err(EXIT_FAILURE, "open_tree('%s', OPEN_TREE_CLONE)", new); if (syscall(SYS_move_mount, newfd, "", AT_FDCWD, old, MOVE_MOUNT_F_EMPTY_PATH)) err(EXIT_FAILURE, "move_mount('%s' -> '%s')", new, old); if (syscall(SYS_move_mount, oldfd, "", newfd, "old", MOVE_MOUNT_F_EMPTY_PATH)) err(EXIT_FAILURE, "move_mount('%s' -> (new)'%s'/old)", old, old); return 0; } On 6.14 (Fedora 42) this looks like: [root@fedora-bls-efi-127-0-0-2-2201 tmp]# sh test.sh + uname -a Linux fedora-bls-efi-127-0-0-2-2201 6.14.5-300.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 2 14:16:46 UTC 2025 x86_64 GNU/Linux + umount --recursive tmp/mnt umount: tmp/mnt: not found + true + rm -rf tmp/mnt tmp/new + mkdir -p tmp/mnt tmp/new tmp/new/old + touch tmp/mnt/this-is-old + touch tmp/new/this-is-new + ./swapmnt tmp/new tmp/mnt + find tmp/mnt tmp/mnt tmp/mnt/this-is-new tmp/mnt/old tmp/mnt/old/this-is-old [root@fedora-bls-efi-127-0-0-2-2201 tmp]# On 6.15 from yesterday (9f35e33144ae, via @kernel-vanilla/mainline copr, on rawhide): [root@fedora tmp]# sh test.sh + uname -a Linux fedora 6.15.0-0.rc6.20250514.9f35e331.450.vanilla.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 14 04:18:35 UTC 2025 x86_64 GNU/Linux + umount --recursive tmp/mnt umount: tmp/mnt: not mounted + true + rm -rf tmp/mnt tmp/new + mkdir -p tmp/mnt tmp/new tmp/new/old + touch tmp/mnt/this-is-old + touch tmp/new/this-is-new + ./swapmnt tmp/new tmp/mnt + find tmp/mnt tmp/mnt tmp/mnt/this-is-new find: File system loop detected; ‘tmp/mnt/old’ is part of the same file system loop as ‘tmp/mnt’. [root@fedora tmp]# Otherwise, I gotta say I'm loving all of the new mount work this cycle! Thanks, lis