mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:31:45 +00:00
[BTRFS] Upgrade to 1.1
CORE-15452
This commit is contained in:
parent
e8d16d0a7d
commit
eb7fbc253f
61 changed files with 22605 additions and 596 deletions
|
@ -296,11 +296,21 @@ static NTSTATUS fast_io_acquire_for_mod_write(PFILE_OBJECT FileObject, PLARGE_IN
|
|||
if (!fcb)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
*ResourceToRelease = fcb->Header.PagingIoResource;
|
||||
// Make sure we don't get interrupted by the flush thread, which can cause a deadlock
|
||||
|
||||
if (!ExAcquireResourceSharedLite(*ResourceToRelease, FALSE))
|
||||
if (!ExAcquireResourceSharedLite(&fcb->Vcb->tree_lock, FALSE))
|
||||
return STATUS_CANT_WAIT;
|
||||
|
||||
// Ideally this would be PagingIoResource, but that doesn't play well with copy-on-write,
|
||||
// as we can't guarantee that we won't need to do any reallocations.
|
||||
|
||||
*ResourceToRelease = fcb->Header.Resource;
|
||||
|
||||
if (!ExAcquireResourceExclusiveLite(*ResourceToRelease, FALSE)) {
|
||||
ExReleaseResourceLite(&fcb->Vcb->tree_lock);
|
||||
return STATUS_CANT_WAIT;
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -310,11 +320,16 @@ static NTSTATUS NTAPI fast_io_release_for_mod_write(PFILE_OBJECT FileObject, str
|
|||
#else
|
||||
static NTSTATUS fast_io_release_for_mod_write(PFILE_OBJECT FileObject, struct _ERESOURCE *ResourceToRelease, PDEVICE_OBJECT DeviceObject) {
|
||||
#endif
|
||||
UNUSED(FileObject);
|
||||
fcb* fcb;
|
||||
|
||||
UNUSED(DeviceObject);
|
||||
|
||||
fcb = FileObject->FsContext;
|
||||
|
||||
ExReleaseResourceLite(ResourceToRelease);
|
||||
|
||||
ExReleaseResourceLite(&fcb->Vcb->tree_lock);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue