mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
loop-util: fix error condition and return value
Fixes a bug introduced byda4fd28871
. (cherry picked from commit2421dd7267
)
This commit is contained in:
parent
ec6c1fbf7d
commit
6dafcad55c
@ -577,8 +577,8 @@ static int loop_device_make_internal(
|
||||
* device, and called LOOP_CTL_REMOVE on it. Let's retry with a new number.
|
||||
* -EBUSY: a file descriptor is already bound to the loopback block device.
|
||||
* -EUCLEAN: some left-over partition devices that were cleaned up. */
|
||||
if (!ERRNO_IS_DEVICE_ABSENT(errno) && !IN_SET(r, -EBUSY, -EUCLEAN))
|
||||
return -errno;
|
||||
if (!ERRNO_IS_DEVICE_ABSENT(r) && !IN_SET(r, -EBUSY, -EUCLEAN))
|
||||
return r;
|
||||
|
||||
/* OK, this didn't work, let's try again a bit later, but first release the lock on the
|
||||
* control device */
|
||||
|
Loading…
Reference in New Issue
Block a user