From: Lennart Poettering Date: Thu, 24 Sep 2020 13:08:22 +0000 (+0200) Subject: loop-util: apparently opening a loop device sometimes results in ENXIO, handle this X-Git-Tag: v247-rc1~171^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=77ad674b51ceb598aae1adaa7abe572ad0262f39;p=thirdparty%2Fsystemd.git loop-util: apparently opening a loop device sometimes results in ENXIO, handle this --- diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c index 8760cc89d97..4843cbcaabc 100644 --- a/src/shared/loop-util.c +++ b/src/shared/loop-util.c @@ -198,7 +198,7 @@ int loop_device_make( if (loop < 0) { /* Somebody might've gotten the same number from the kernel, used the device, * and called LOOP_CTL_REMOVE on it. Let's retry with a new number. */ - if (errno != ENOENT) + if (!IN_SET(errno, ENOENT, ENXIO)) return -errno; } else { r = loop_configure(loop, &config);