]> git.ipfire.org Git - thirdparty/systemd.git/commit
loop-util: explicitly close loopback block device before sleeping
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2022 21:34:44 +0000 (23:34 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 Apr 2022 16:55:58 +0000 (18:55 +0200)
commit3e9210577dbe78b3c0cc9a8b0488c51f7339dd02
tree7e9e81e0b04416bc076413d71cf416a394c169c0
parent49043f811559a98232c0401371f85953cd0ae273
loop-util: explicitly close loopback block device before sleeping

attach_empty() file takes a BSD file lock on the device, and we really
should release that before going to sleep. hence explicitly close the
block device before the sleep instead of relying on _cleanup_ to close
it after the sleep.
src/shared/loop-util.c