1 /* $Id: cleanup.c,v 1.3 2001/11/02 22:44:34 hbirr Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: services/fs/vfat/cleanup.c
6 * PURPOSE: VFAT Filesystem
7 * PROGRAMMER: Jason Filby (jasonfilby@yahoo.com)
10 /* INCLUDES *****************************************************************/
12 #include <ddk/ntddk.h>
19 /* FUNCTIONS ****************************************************************/
22 VfatCleanupFile(PDEVICE_EXTENSION DeviceExt
,
23 PFILE_OBJECT FileObject
)
25 * FUNCTION: Cleans up after a file has been closed.
28 DPRINT("VfatCleanupFile(DeviceExt %x, FileObject %x)\n",
29 DeviceExt
, FileObject
);
31 /* FIXME: handle file/directory deletion here */
33 return STATUS_SUCCESS
;
36 NTSTATUS
VfatCleanup (PVFAT_IRP_CONTEXT IrpContext
)
38 * FUNCTION: Cleans up after a file has been closed.
43 DPRINT("VfatCleanup(DeviceObject %x, Irp %x)\n", DeviceObject
, Irp
);
45 if (!ExAcquireResourceExclusiveLite (&IrpContext
->DeviceExt
->DirResource
, IrpContext
->Flags
& IRPCONTEXT_CANWAIT
))
47 return VfatQueueRequest (IrpContext
);
50 Status
= VfatCleanupFile(IrpContext
->DeviceExt
, IrpContext
->FileObject
);
52 ExReleaseResourceLite (&IrpContext
->DeviceExt
->DirResource
);
54 IrpContext
->Irp
->IoStatus
.Status
= Status
;
55 IrpContext
->Irp
->IoStatus
.Information
= 0;
57 IoCompleteRequest (IrpContext
->Irp
, IO_NO_INCREMENT
);
58 VfatFreeIrpContext(IrpContext
);