NTFS: Fix cluster (de)allocators to work when the runlist is NULL and more

importantly to take a locked runlist rather than them locking it
      which leads to lock reversal.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
This commit is contained in:
Anton Altaparmakov
2005-09-08 21:09:06 +01:00
parent 807c453de7
commit bbf1813fb8
4 changed files with 32 additions and 33 deletions

View File

@@ -1953,7 +1953,7 @@ restore_undo_alloc:
a = ctx->attr;
a->data.non_resident.highest_vcn = cpu_to_sle64(old_last_vcn - 1);
undo_alloc:
if (ntfs_cluster_free(vol->mft_ino, old_last_vcn, -1) < 0) {
if (ntfs_cluster_free(vol->mft_ino, old_last_vcn, -1, TRUE) < 0) {
ntfs_error(vol->sb, "Failed to free clusters from mft data "
"attribute.%s", es);
NVolSetErrors(vol);