]> git.ipfire.org Git - thirdparty/systemd.git/commit
switch-root: also check that mount IDs are the same, not just inodes 30332/head
authorLuca Boccassi <bluca@debian.org>
Tue, 5 Dec 2023 15:43:12 +0000 (15:43 +0000)
committerLuca Boccassi <bluca@debian.org>
Tue, 5 Dec 2023 17:20:27 +0000 (17:20 +0000)
commitf83a74dfb8210f0d67943912c539e51b989f85a4
tree5207041a00c7286dd34e20661ed1119ab00ea293
parent5134e5462513c9dca8d3cb03ab4d2e3c43421af9
switch-root: also check that mount IDs are the same, not just inodes

If /run/nextroot/ has been set up, use it, even if the inodes are
the same. It could be a verity device that is reused, but with
different sub-mounts or other differences. Or the same / tmpfs with
different /usr/ mounts. If it was explicitly set up we should use it.

Use the new helper to check that the mount IDs are also the same,
not just the inodes.
src/shared/switch-root.c