[BTRFS] Upgrade to 1.1

CORE-15452
This commit is contained in:
Pierre Schweitzer 2018-12-16 12:03:16 +01:00
parent e8d16d0a7d
commit eb7fbc253f
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
61 changed files with 22605 additions and 596 deletions

View file

@ -496,7 +496,7 @@ void remove_volume_child(_Inout_ _Requires_exclusive_lock_held_(_Curr_->child_lo
pdo = vde->pdo;
IoDeleteDevice(vde->device);
if (no_pnp)
if (!no_pnp)
IoDeleteDevice(pdo);
}
} else
@ -540,7 +540,7 @@ void volume_arrival(PDRIVER_OBJECT DriverObject, PUNICODE_STRING devpath) {
TRACE("DeviceType = %u, DeviceNumber = %u, PartitionNumber = %u\n", sdn.DeviceType, sdn.DeviceNumber, sdn.PartitionNumber);
// If we've just added a partition to a whole-disk filesystem, unmount it
if (sdn.DeviceNumber != 0xffffffff) {
if (sdn.DeviceNumber != 0xffffffff && sdn.PartitionNumber != 0) {
LIST_ENTRY* le;
ExAcquireResourceExclusiveLite(&pdo_list_lock, TRUE);
@ -823,7 +823,7 @@ static void mountmgr_process_drive(PDEVICE_OBJECT mountmgr, PUNICODE_STRING devi
static void mountmgr_updated(PDEVICE_OBJECT mountmgr, MOUNTMGR_MOUNT_POINTS* mmps) {
ULONG i;
static WCHAR pref[] = L"\\DosDevices\\";
static const WCHAR pref[] = L"\\DosDevices\\";
for (i = 0; i < mmps->NumberOfMountPoints; i++) {
UNICODE_STRING symlink, device_name;
@ -844,8 +844,8 @@ static void mountmgr_updated(PDEVICE_OBJECT mountmgr, MOUNTMGR_MOUNT_POINTS* mmp
device_name.Length = device_name.MaximumLength = 0;
}
if (symlink.Length > wcslen(pref) * sizeof(WCHAR) &&
RtlCompareMemory(symlink.Buffer, pref, wcslen(pref) * sizeof(WCHAR)) == wcslen(pref) * sizeof(WCHAR))
if (symlink.Length > sizeof(pref) - sizeof(WCHAR) &&
RtlCompareMemory(symlink.Buffer, pref, sizeof(pref) - sizeof(WCHAR)) == sizeof(pref) - sizeof(WCHAR))
mountmgr_process_drive(mountmgr, &device_name);
}
}