sys/vfs/hammer: Fix possible race on volume-del
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 7 Sep 2015 14:11:29 +0000 (23:11 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 24 Sep 2015 14:09:50 +0000 (23:09 +0900)
commitb6abf391331196a9bc858db937aa8a839ea0fedb
tree4f72309ff30678228f69e5db02ef000acc222bba
parent8fc055b2e80aa7c8dd4806b712fcb44e7e445984
sys/vfs/hammer: Fix possible race on volume-del

hmp->volume_to_remove should get reset to -1 only after the
volume is successfully removed. Otherwise there is a possible
race between this and blockmap allocation code who checks if
hmp->volume_to_remove is the volume being removed.

Spotted-by: dillon
sys/vfs/hammer/hammer_volume.c