mirror of
https://github.com/reactos/reactos.git
synced 2024-10-31 20:02:55 +00:00
[CDFS] Implement open handle count
This commit is contained in:
parent
fa0327d6c5
commit
95447d2fd1
|
@ -170,6 +170,9 @@ typedef struct
|
||||||
/* Notifications */
|
/* Notifications */
|
||||||
LIST_ENTRY NotifyList;
|
LIST_ENTRY NotifyList;
|
||||||
PNOTIFY_SYNC NotifySync;
|
PNOTIFY_SYNC NotifySync;
|
||||||
|
|
||||||
|
/* Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP */
|
||||||
|
ULONG OpenHandleCount;
|
||||||
} DEVICE_EXTENSION, *PDEVICE_EXTENSION, VCB, *PVCB;
|
} DEVICE_EXTENSION, *PDEVICE_EXTENSION, VCB, *PVCB;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ CdfsCleanupFile(PCDFS_IRP_CONTEXT IrpContext,
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceExt->OpenHandleCount--;
|
||||||
|
|
||||||
/* Notify about the cleanup */
|
/* Notify about the cleanup */
|
||||||
FsRtlNotifyCleanup(DeviceExt->NotifySync,
|
FsRtlNotifyCleanup(DeviceExt->NotifySync,
|
||||||
&(DeviceExt->NotifyList),
|
&(DeviceExt->NotifyList),
|
||||||
|
|
|
@ -241,6 +241,8 @@ CdfsCreateFile(PDEVICE_OBJECT DeviceObject,
|
||||||
CdfsCloseFile (DeviceExt, FileObject);
|
CdfsCloseFile (DeviceExt, FileObject);
|
||||||
return STATUS_NOT_A_DIRECTORY;
|
return STATUS_NOT_A_DIRECTORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeviceExt->OpenHandleCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -271,6 +273,7 @@ CdfsCreate(
|
||||||
/* DeviceObject represents FileSystem instead of logical volume */
|
/* DeviceObject represents FileSystem instead of logical volume */
|
||||||
DPRINT("Opening file system\n");
|
DPRINT("Opening file system\n");
|
||||||
IrpContext->Irp->IoStatus.Information = FILE_OPENED;
|
IrpContext->Irp->IoStatus.Information = FILE_OPENED;
|
||||||
|
DeviceExt->OpenHandleCount++;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue