]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
namespace: don't log misleading error in the r > 0 path
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 17 Apr 2026 13:51:40 +0000 (15:51 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 22 May 2026 12:32:04 +0000 (13:32 +0100)
fd_is_fs_type() returns < 0 for errors, 0 for false, and > 0 for true, so
in the r > branch we'd most likely report EPERM together with the error
message which is misleading.

(cherry picked from commit c859d41232b3bcff9f9b01f1281c1b202f15d0b2)

src/core/namespace.c

index 6e4ec80dc96d4e13f4d22f7aa6b730badd413222..c6e5614676043e4fe49faa982e474ba89576179d 100644 (file)
@@ -3665,7 +3665,7 @@ static int unpeel_get_fd(const char *mount_path, int *ret_fd) {
                         _exit(EXIT_FAILURE);
                 }
                 if (r > 0) {
-                        log_debug_errno(r, "'%s' is still an overlay after opening mount tree: %m", mount_path);
+                        log_debug("'%s' is still an overlay after opening mount tree", mount_path);
                         _exit(EXIT_FAILURE);
                 }