block: remove target directory after unmounting
authorRafał Miłecki <rafal@milecki.pl>
Mon, 10 Dec 2018 06:48:50 +0000 (07:48 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Wed, 12 Dec 2018 13:02:38 +0000 (14:02 +0100)
commit28753b3f027084fa2ca184bc8f8c54db36cc2421
tree12a835e9db629721cdedabad76526fc8d514d71e
parentc8c7ca567a4c14755ffc9014ee8e527af996a0ce
block: remove target directory after unmounting

This removes dangling directory fixing two issues:

1) Non autofs case
   Leaving directory in /mnt/ and switching to autofs would result in
   blockd failing to symlink().
2) autofs case
   Leaving directory in /var/run/blockd/ could result in apps trying to
   access it causing errors like:
   blockd: kernel is requesting a mount -> sda1
   blockd: failed to run block. add/sda1

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