https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e6cd48809abe178cc9b5c…
commit e6cd48809abe178cc9b5c20670ce1a8770ae9d2d
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Tue Dec 25 13:50:07 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Tue Dec 25 13:50:41 2018 +0100
[BTRFS] Reduce diff with upstream
CORE-15452
---
drivers/filesystems/btrfs/btrfs_drv.h | 12 ++++++++++++
drivers/filesystems/btrfs/create.c | 6 ------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/filesystems/btrfs/btrfs_drv.h
b/drivers/filesystems/btrfs/btrfs_drv.h
index e6ea5891f3..3ccb10ac06 100644
--- a/drivers/filesystems/btrfs/btrfs_drv.h
+++ b/drivers/filesystems/btrfs/btrfs_drv.h
@@ -1856,6 +1856,11 @@ NTSTATUS NTAPI ZwQueryInformationProcess(
#endif
#endif
+#if defined(__REACTOS__) && (NTDDI_VERSION < NTDDI_VISTA)
+typedef struct _ECP_LIST ECP_LIST;
+typedef struct _ECP_LIST *PECP_LIST;
+#endif
+
#if defined(__REACTOS__) && (NTDDI_VERSION < NTDDI_WIN7)
NTSTATUS WINAPI RtlUnicodeToUTF8N(CHAR *utf8_dest, ULONG utf8_bytes_max,
ULONG *utf8_bytes_written,
@@ -1870,6 +1875,13 @@ NTSTATUS NTAPI FsRtlRemoveDotsFromPath(PWSTR OriginalString,
NTSTATUS NTAPI FsRtlValidateReparsePointBuffer(ULONG BufferLength,
PREPARSE_DATA_BUFFER ReparseBuffer);
ULONG NTAPI KeQueryActiveProcessorCount(PKAFFINITY ActiveProcessors);
+NTSTATUS NTAPI FsRtlGetEcpListFromIrp(IN PIRP Irp,
+ OUT PECP_LIST *EcpList);
+NTSTATUS NTAPI FsRtlGetNextExtraCreateParameter(IN PECP_LIST EcpList,
+ IN PVOID CurrentEcpContext,
+ OUT LPGUID NextEcpType OPTIONAL,
+ OUT PVOID *NextEcpContext,
+ OUT PULONG NextEcpContextSize OPTIONAL);
#endif /* defined(__REACTOS__) && (NTDDI_VERSION < NTDDI_VISTA) */
#endif
diff --git a/drivers/filesystems/btrfs/create.c b/drivers/filesystems/btrfs/create.c
index 1b4417e802..2cde2371e8 100644
--- a/drivers/filesystems/btrfs/create.c
+++ b/drivers/filesystems/btrfs/create.c
@@ -2510,10 +2510,8 @@ static NTSTATUS file_create(PIRP Irp,
_Requires_lock_held_(_Curr_->tree_lock) _R
UNICODE_STRING dsus, fpus, stream;
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
POOL_TYPE pool_type = IrpSp->Flags & SL_OPEN_PAGING_FILE ? NonPagedPool :
PagedPool;
-#ifndef __REACTOS__
ECP_LIST* ecp_list;
ATOMIC_CREATE_ECP_CONTEXT* acec = NULL;
-#endif
#ifdef DEBUG_FCB_REFCOUNTS
LONG oc;
#endif
@@ -2526,7 +2524,6 @@ static NTSTATUS file_create(PIRP Irp,
_Requires_lock_held_(_Curr_->tree_lock) _R
if (options & FILE_DELETE_ON_CLOSE &&
IrpSp->Parameters.Create.FileAttributes & FILE_ATTRIBUTE_READONLY)
return STATUS_CANNOT_DELETE;
-#ifndef __REACTOS__
if (NT_SUCCESS(FsRtlGetEcpListFromIrp(Irp, &ecp_list)) && ecp_list) {
void* ctx = NULL;
GUID type;
@@ -2543,7 +2540,6 @@ static NTSTATUS file_create(PIRP Irp,
_Requires_lock_held_(_Curr_->tree_lock) _R
}
} while (NT_SUCCESS(Status));
}
-#endif
dsus.Buffer = (WCHAR*)datasuf;
dsus.Length = dsus.MaximumLength = sizeof(datasuf) - sizeof(WCHAR);
@@ -2720,7 +2716,6 @@ static NTSTATUS file_create(PIRP Irp,
_Requires_lock_held_(_Curr_->tree_lock) _R
FileObject->SectionObjectPointer =
&fileref->fcb->nonpaged->segment_object;
-#ifndef __REACTOS__
// FIXME - ATOMIC_CREATE_ECP_IN_FLAG_BEST_EFFORT
if (acec && acec->InFlags &
ATOMIC_CREATE_ECP_IN_FLAG_REPARSE_POINT_SPECIFIED) {
if (acec->ReparseBufferLength > sizeof(UINT32) &&
*(UINT32*)acec->ReparseBuffer == IO_REPARSE_TAG_SYMLINK) {
@@ -2751,7 +2746,6 @@ static NTSTATUS file_create(PIRP Irp,
_Requires_lock_held_(_Curr_->tree_lock) _R
acec->OutFlags |= ATOMIC_CREATE_ECP_OUT_FLAG_REPARSE_POINT_SET;
}
-#endif
fileref->dc->type = fileref->fcb->type;