mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[BTRFS] Revert "Leak the root stream file object on mount."
Not needed anymore.
This reverts commit c13ccc92f6
.
This commit is contained in:
parent
ddc853a4be
commit
e08dc30569
1 changed files with 0 additions and 14 deletions
|
@ -4785,21 +4785,7 @@ static NTSTATUS mount_vol(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp) {
|
|||
goto exit;
|
||||
}
|
||||
|
||||
/* HACK: stream file object seems to get deleted at some point
|
||||
* leading to use after free when installing ReactOS on
|
||||
* BtrFS.
|
||||
* Workaround: leak a handle to the fileobject
|
||||
* XXX: Could be improved by storing it somewhere and releasing it
|
||||
* on dismount. Or even by referencing again the file object.
|
||||
*/
|
||||
#ifndef __REACTOS__
|
||||
Vcb->root_file = IoCreateStreamFileObject(NULL, DeviceToMount);
|
||||
#else
|
||||
{
|
||||
HANDLE Dummy;
|
||||
Vcb->root_file = IoCreateStreamFileObjectEx(NULL, DeviceToMount, &Dummy);
|
||||
}
|
||||
#endif
|
||||
Vcb->root_file->FsContext = root_fcb;
|
||||
Vcb->root_file->SectionObjectPointer = &root_fcb->nonpaged->segment_object;
|
||||
Vcb->root_file->Vpb = DeviceObject->Vpb;
|
||||
|
|
Loading…
Reference in a new issue