First make the directory accessible again, otherwise os.path.ismount may not detect it (so umount would not be called) and then rmdir will fail.
If unmount is going to fail, let it do so explicitly, instead of hiding the failure now, and observing it later at rmdir. And if it fails, lets report what process is using that mount point.
Tested: - _copy_file() - _create_sparse_file() - _resize_file() - _update_loopdev_sizes() Smoke tested by calls from the functions above: - _replace_file() - _rename_file() - _make_dir() - _fsync_dir()