]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: Fix incorrect detach of reused loop device
authorStanislav Brabec <sbrabec@suse.cz>
Thu, 12 Jan 2017 14:45:42 +0000 (15:45 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Jan 2017 11:25:45 +0000 (12:25 +0100)
commit7b46647df4d7d568de91fa8da1c2342acd960e8e
treeccb04ec479807ef4e3ba80feb31c4b3c70444f01
parent3789806db21dea8e009ceea8f6158bc778151afe
libmount: Fix incorrect detach of reused loop device

If -oloop is used and the loop device is reused, the loop device is detached
after umount. It is incorrect as it could break the another task using the loop
device.

This is caused by mnt_context_enable_loopdel(,TRUE) that is called from
mnt_context_prepare_umount() whenever "loop" option is used, independently on
AUTOCLEAR flag.

Remove the "loop" option for reused devices to prevent detaching of reused loop
device.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
libmount/src/context_loopdev.c