command/storage: check if mount point is busy

When mounting something over a directory that is already a mount
point, CompositeStorage::Mount() silently overwrites the previously
mounted storage, disposing it.  After that, SimpleDatabase::Mount()
will fail and handle_mount() will roll back the
CompositeStorage::Mount() command, effectively unmounting what was
there before (and also leaking memory).

Closes https://github.com/MusicPlayerDaemon/MPD/issues/918
This commit is contained in:
Max Kellermann
2020-07-06 17:45:59 +02:00
parent 5b291ff768
commit 33ee35ab92
5 changed files with 23 additions and 2 deletions

1
NEWS
View File

@@ -2,6 +2,7 @@ ver 0.21.25 (not yet released)
* protocol:
- fix crash when using "rangeid" while playing
* storage
- fix disappearing mounts after mounting twice
- udisks: fix reading ".mpdignore"
* input
- file: detect premature end of file