From 845f7f54d239cfc730fcb6bdbb65c697532b1f8c Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 13 Nov 2007 15:45:33 +0000 Subject: [PATCH] - Make file lock and unlock operations succeed without doing actual locking (enough to make some apps work even if they don't have proper locking). DPRINT1s are inserted, so that this is not going to be forgotten. svn path=/trunk/; revision=30424 --- reactos/ntoskrnl/fsrtl/filelock.c | 35 +++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/fsrtl/filelock.c b/reactos/ntoskrnl/fsrtl/filelock.c index 2bbd0dac4ce..5491088d99c 100644 --- a/reactos/ntoskrnl/fsrtl/filelock.c +++ b/reactos/ntoskrnl/fsrtl/filelock.c @@ -77,8 +77,34 @@ FsRtlPrivateLock(IN PFILE_LOCK FileLock, IN PVOID Context OPTIONAL, IN BOOLEAN AlreadySynchronized) { - KEBUGCHECK(0); - return FALSE; + NTSTATUS Status; + + DPRINT1("FsRtlPrivateLock() is stubplemented!\n"); + + /* Initialize the lock, if necessary */ + if (!FileLock->LockInformation) + { + DPRINT("LockInformation is uninitialized!\n"); + } + + /* Assume all is cool, and lock is set */ + IoStatus->Status = STATUS_SUCCESS; + + if (Irp) + { + /* Complete the request */ + FsRtlCompleteLockIrpReal(FileLock->CompleteLockIrpRoutine, + Context, + Irp, + IoStatus->Status, + &Status, + FileObject); + + /* Update the status */ + IoStatus->Status = Status; + } + + return TRUE; } /* @@ -151,8 +177,9 @@ FsRtlFastUnlockSingle(IN PFILE_LOCK FileLock, IN PVOID Context OPTIONAL, IN BOOLEAN AlreadySynchronized) { - KEBUGCHECK(0); - return STATUS_UNSUCCESSFUL; + DPRINT1("FsRtlFastUnlockSingle() is stubplemented!\n"); + + return STATUS_SUCCESS; } /*