mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 17:32:57 -05:00
sys: FSP_FILE_NODE: add HandleCount field and refactor cleanup/close/rename
This commit is contained in:
@ -879,10 +879,10 @@ static NTSTATUS FspFsvolSetRenameInformation(
|
||||
|
||||
Result = STATUS_SUCCESS;
|
||||
FspFsvolDeviceLockContextTable(FsvolDeviceObject);
|
||||
if (1 < FileNode->OpenCount ||
|
||||
if (1 < FileNode->HandleCount ||
|
||||
(FileNode->IsDirectory &&
|
||||
0 != FspFsvolDeviceLookupDescendantContextByName(FsvolDeviceObject, &FileNode->FileName, TRUE)) ||
|
||||
0 != FspFsvolDeviceLookupDescendantContextByName(FsvolDeviceObject, &NewFileName, FALSE))
|
||||
FspFileNodeHasOpenHandles(FsvolDeviceObject, &FileNode->FileName, TRUE)) ||
|
||||
FspFileNodeHasOpenHandles(FsvolDeviceObject, &NewFileName, FALSE))
|
||||
Result = STATUS_ACCESS_DENIED;
|
||||
FspFsvolDeviceUnlockContextTable(FsvolDeviceObject);
|
||||
if (!NT_SUCCESS(Result))
|
||||
|
Reference in New Issue
Block a user