]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mountwork: use statx_mount_same() where appropriate
authorLennart Poettering <lennart@amutable.com>
Wed, 25 Feb 2026 12:08:48 +0000 (13:08 +0100)
committerLennart Poettering <lennart@amutable.com>
Tue, 3 Mar 2026 07:48:01 +0000 (08:48 +0100)
src/mountfsd/mountwork.c

index 7115f33e36be98c52db231c3b3c6cd4c92120559..2e75ac532f8d8b11068115b632346bfe9afb23d8 100644 (file)
@@ -947,7 +947,7 @@ static DirectoryOwnership validate_directory_fd(
                         return DIRECTORY_IS_OTHERWISE_OWNED;
                 }
 
-                if (stx.stx_mnt_id != new_stx.stx_mnt_id) {
+                if (!statx_mount_same(&stx, &new_stx)) {
                         /* NB, this check is probably redundant, given we also check
                          * STATX_ATTR_MOUNT_ROOT. The only reason we have it here is to provide extra safety
                          * in case the mount tree is rearranged concurrently with our traversal, so that