block: remove mount target file if it's a link
authorRafał Miłecki <rafal@milecki.pl>
Sat, 28 Dec 2019 21:07:21 +0000 (22:07 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Sat, 21 Mar 2020 21:40:52 +0000 (22:40 +0100)
commitd1f1f2b38fa1e7b594bd005e563679a40e4d7e95
treee88d1591025850b836a42b9b2a7ddc945c64ad41
parent62c578c22f9d87ab9a7b686dece913861cf34c34
block: remove mount target file if it's a link

Links like that can remain from using autofs and can cause mounting
errors after switching to non-autofs:

block: mounting /dev/sda1 (vfat) as /mnt/sda1 failed (2) - No such file or directory

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
block.c