[NTOS:IO] RAW-FS: Few improvements.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 11 Nov 2018 20:27:30 +0000 (21:27 +0100)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 11 Nov 2018 20:56:18 +0000 (21:56 +0100)
commitcbaa8e7dfb941f8038ff50eeca516696af8268bd
tree428772d161d8007dccfc1b28b04b5b89ea3dd5fc
parenta5ead049d9fdfff914ead19e91a5c5efa5408b55
[NTOS:IO] RAW-FS: Few improvements.

- Simplify the volume-deletion code in RawCheckForDismount().

- Fixes the OpenCount check in RawClose(): the VCB mutex must be
  released when the volume has not been dismounted, either because
  OpenCount != 0 or because RawCheckForDismount() returned FALSE.

- Explicitly use VCB_STATE_LOCKED instead of hardcoding its value.

- In IRP_MN_VERIFY_VOLUME handling, lock the volume before playing
  with it, and again let the volume be dismounted only if OpenCount == 0
  (and the IoDeleteDevice() call is done by RawCheckForDismount()).
ntoskrnl/io/iomgr/rawfs.c