2001-11-02 22:47:36 +00:00
|
|
|
/* $Id: cleanup.c,v 1.3 2001/11/02 22:44:34 hbirr Exp $
|
2001-03-07 13:44:41 +00:00
|
|
|
*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* FILE: services/fs/vfat/cleanup.c
|
|
|
|
* PURPOSE: VFAT Filesystem
|
|
|
|
* PROGRAMMER: Jason Filby (jasonfilby@yahoo.com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
|
|
|
#include <ddk/ntddk.h>
|
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
#include "vfat.h"
|
|
|
|
|
|
|
|
/* FUNCTIONS ****************************************************************/
|
|
|
|
|
|
|
|
static NTSTATUS
|
|
|
|
VfatCleanupFile(PDEVICE_EXTENSION DeviceExt,
|
|
|
|
PFILE_OBJECT FileObject)
|
|
|
|
/*
|
|
|
|
* FUNCTION: Cleans up after a file has been closed.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
DPRINT("VfatCleanupFile(DeviceExt %x, FileObject %x)\n",
|
2001-11-02 22:47:36 +00:00
|
|
|
DeviceExt, FileObject);
|
2001-03-07 13:44:41 +00:00
|
|
|
|
|
|
|
/* FIXME: handle file/directory deletion here */
|
|
|
|
|
2001-11-02 22:47:36 +00:00
|
|
|
return STATUS_SUCCESS;
|
2001-03-07 13:44:41 +00:00
|
|
|
}
|
|
|
|
|
2001-11-02 22:47:36 +00:00
|
|
|
NTSTATUS VfatCleanup (PVFAT_IRP_CONTEXT IrpContext)
|
2001-03-07 13:44:41 +00:00
|
|
|
/*
|
|
|
|
* FUNCTION: Cleans up after a file has been closed.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
NTSTATUS Status;
|
|
|
|
|
2001-03-08 22:06:02 +00:00
|
|
|
DPRINT("VfatCleanup(DeviceObject %x, Irp %x)\n", DeviceObject, Irp);
|
2001-03-07 13:44:41 +00:00
|
|
|
|
2001-11-02 22:47:36 +00:00
|
|
|
if (!ExAcquireResourceExclusiveLite (&IrpContext->DeviceExt->DirResource, IrpContext->Flags & IRPCONTEXT_CANWAIT))
|
|
|
|
{
|
|
|
|
return VfatQueueRequest (IrpContext);
|
|
|
|
}
|
2001-03-07 13:44:41 +00:00
|
|
|
|
2001-11-02 22:47:36 +00:00
|
|
|
Status = VfatCleanupFile(IrpContext->DeviceExt, IrpContext->FileObject);
|
2001-03-07 13:44:41 +00:00
|
|
|
|
2001-11-02 22:47:36 +00:00
|
|
|
ExReleaseResourceLite (&IrpContext->DeviceExt->DirResource);
|
|
|
|
|
|
|
|
IrpContext->Irp->IoStatus.Status = Status;
|
|
|
|
IrpContext->Irp->IoStatus.Information = 0;
|
|
|
|
|
|
|
|
IoCompleteRequest (IrpContext->Irp, IO_NO_INCREMENT);
|
|
|
|
VfatFreeIrpContext(IrpContext);
|
2001-03-07 13:44:41 +00:00
|
|
|
return (Status);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|