[PATCH 16/22] ntdll: Don't use exclusive loader lock in LdrLoadDll() when possible.
Paul Gofman
pgofman at codeweavers.com
Fri Oct 1 13:21:01 CDT 2021
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
dlls/ntdll/loader.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 99d5c08b002..37323608c3a 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3321,6 +3321,8 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH LdrLoadDll(LPCWSTR path_name, DWORD flags,
WINE_MODREF *wm;
NTSTATUS nts;
+ if (!LdrGetDllHandleEx( 0, path_name, NULL, libname, hModule )) return STATUS_SUCCESS;
+
lock_loader_exclusive();
nts = load_dll( path_name, libname->Buffer, L".dll", flags, &wm );
--
2.31.1
More information about the wine-devel
mailing list