mountwork: use statx_mount_same() where appropriate

This commit is contained in:
Lennart Poettering
2026-03-03 08:48:01 +01:00
parent e4206858ad
commit 6d61bb671d
+1 -1
View 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