MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2SetReparsePoint

Function Ext2SetReparsePoint

Ext4Fsd/fsctl.c:1569–1746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1567}
1568
1569NTSTATUS
1570Ext2SetReparsePoint (IN PEXT2_IRP_CONTEXT IrpContext)
1571{
1572 PIRP Irp = NULL;
1573 PIO_STACK_LOCATION IrpSp;
1574
1575 PDEVICE_OBJECT DeviceObject;
1576
1577 PEXT2_VCB Vcb = NULL;
1578 PEXT2_FCB Fcb = NULL;
1579 PEXT2_CCB Ccb = NULL;
1580 PEXT2_MCB Mcb = NULL;
1581
1582 NTSTATUS Status = STATUS_UNSUCCESSFUL;
1583
1584 PVOID InputBuffer;
1585 ULONG InputBufferLength;
1586 ULONG BytesWritten = 0;
1587
1588 PEXT2_FCB ParentDcb = NULL; /* Dcb of it's current parent */
1589 PEXT2_MCB ParentMcb = NULL;
1590
1591 PREPARSE_DATA_BUFFER RDB;
1592
1593 UNICODE_STRING UniName;
1594 OEM_STRING OemName;
1595
1596 PCHAR OemNameBuffer = NULL;
1597 int OemNameLength = 0, i;
1598
1599 BOOLEAN MainResourceAcquired = FALSE;
1600 BOOLEAN FcbLockAcquired = FALSE;
1601
1602 __try {
1603
1604 Ccb = IrpContext->Ccb;
1605 ASSERT(Ccb != NULL);
1606 ASSERT((Ccb->Identifier.Type == EXT2CCB) &&
1607 (Ccb->Identifier.Size == sizeof(EXT2_CCB)));
1608 DeviceObject = IrpContext->DeviceObject;
1609 Vcb = (PEXT2_VCB) DeviceObject->DeviceExtension;
1610 Fcb = IrpContext->Fcb;
1611 Mcb = Fcb->Mcb;
1612 Irp = IrpContext->Irp;
1613 IrpSp = IoGetCurrentIrpStackLocation(Irp);
1614
1615 ExAcquireResourceExclusiveLite(&Vcb->FcbLock, TRUE);
1616 FcbLockAcquired = TRUE;
1617
1618 ParentMcb = Mcb->Parent;
1619 ParentDcb = ParentMcb->Fcb;
1620 if (ParentDcb == NULL) {
1621 ParentDcb = Ext2AllocateFcb(Vcb, ParentMcb);
1622 }
1623 if (ParentDcb) {
1624 Ext2ReferXcb(&ParentDcb->ReferenceCount);
1625 }
1626

Callers 1

Ext2UserFsRequestFunction · 0.85

Calls 15

Ext2AllocateFcbFunction · 0.85
Ext2InspectReparseDataFunction · 0.85
Ext2UnicodeToOEMSizeFunction · 0.85
Ext2AllocatePoolFunction · 0.85
Ext2UnicodeToOEMFunction · 0.85
Ext2TruncateFileFunction · 0.85
Ext2UpdateGroupDirStatFunction · 0.85
ext3_dec_countFunction · 0.85
Ext2SaveInodeFunction · 0.85
Ext2WriteSymlinkFunction · 0.85
Ext2SetFileTypeFunction · 0.85
Ext2FreePoolFunction · 0.85

Tested by

no test coverage detected