mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +00:00
Reduced some overhead in VfatUpdateEntry.
svn path=/trunk/; revision=3983
This commit is contained in:
parent
7a16a8cbe7
commit
a2aa04440b
1 changed files with 8 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: dirwr.c,v 1.33 2002/12/03 01:14:49 hbirr Exp $
|
/* $Id: dirwr.c,v 1.34 2003/01/11 15:57:55 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -39,22 +39,16 @@ VfatUpdateEntry (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT pFileObject)
|
||||||
{
|
{
|
||||||
PVOID Context;
|
PVOID Context;
|
||||||
PVOID Buffer;
|
PVOID Buffer;
|
||||||
NTSTATUS status;
|
PVFATFCB pDirFcb, pFcb;
|
||||||
PVFATFCB pDirFcb = NULL, pFcb = NULL;
|
|
||||||
LARGE_INTEGER Offset;
|
LARGE_INTEGER Offset;
|
||||||
|
|
||||||
DPRINT ("updEntry PathFileName \'%S\'\n",
|
DPRINT ("updEntry PathFileName \'%S\'\n",
|
||||||
((PVFATCCB)(pFileObject->FsContext2))->pFcb->PathName);
|
((PVFATCCB)(pFileObject->FsContext2))->pFcb->PathName);
|
||||||
status = vfatGetFCBForFile(DeviceExt, &pDirFcb, &pFcb,
|
|
||||||
((PVFATCCB)(pFileObject->FsContext2))->pFcb->PathName);
|
pFcb = ((PVFATCCB)(pFileObject->FsContext2))->pFcb;
|
||||||
if (!NT_SUCCESS(status))
|
assert (pFcb);
|
||||||
{
|
pDirFcb = pFcb->parentFcb;
|
||||||
if (pDirFcb != NULL)
|
assert (pDirFcb);
|
||||||
{
|
|
||||||
vfatReleaseFCB(DeviceExt, pDirFcb);
|
|
||||||
}
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Offset.u.HighPart = 0;
|
Offset.u.HighPart = 0;
|
||||||
Offset.u.LowPart = pFcb->dirIndex * sizeof(FATDirEntry);
|
Offset.u.LowPart = pFcb->dirIndex * sizeof(FATDirEntry);
|
||||||
|
@ -67,8 +61,7 @@ VfatUpdateEntry (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT pFileObject)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DPRINT1 ("Failed write to \'%S\'.\n", pDirFcb->PathName);
|
DPRINT1 ("Failed write to \'%S\'.\n", pDirFcb->PathName);
|
||||||
vfatReleaseFCB(DeviceExt, pDirFcb);
|
|
||||||
vfatReleaseFCB(DeviceExt, pFcb);
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue