core: try again bind mounting if the destination was already created
authorLuca Boccassi <bluca@debian.org>
Sat, 29 Jun 2024 17:31:23 +0000 (18:31 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 5 Jul 2024 18:00:04 +0000 (20:00 +0200)
commitdf990be91348f847f31da8d02d3ee2fbcb946c30
treecd8c005a97d1afdeb632324c0acc4f9d2e029d19
parent24987eb3cc175dd4e5cfaab5abe6da02b64104bc
core: try again bind mounting if the destination was already created

If the destination mount point is on a shared filesystem and is
missing on the first attempt, we try to create it, but then
fail with -EEXIST if something else created it in the meanwhile.
Enter the retry logic on EEXIST, as we can just use the mount
point if it was already created.

Fixes https://github.com/systemd/systemd/issues/29690

(cherry picked from commit c3f0f6f8bd812fee4b2ab658a5cc9ac9167d387d)
src/core/namespace.c