From 43af1e00b7535b4d3bf1a350598055ec4c48b934 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 14 May 2012 12:03:15 -0400 Subject: [PATCH] symlink: optimization for symlinks in cygwin when cygwin attempts to open a file for DELETE access, assume that it means to open the link itself. this avoids making the first open upcall to set up the reparse, only to see RxPrepareToReparseSymbolicLink() return ReparseRequired=FALSE Signed-off-by: Casey Bodley --- sys/nfs41_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c index 1f6e4b7..6799ff7 100644 --- a/sys/nfs41_driver.c +++ b/sys/nfs41_driver.c @@ -3650,6 +3650,8 @@ NTSTATUS nfs41_Create( /* treat the NfsActOnLink ea as FILE_OPEN_REPARSE_POINT */ if (ea && AnsiStrEq(&NfsActOnLink, ea->EaName, ea->EaNameLength)) entry->u.Open.copts |= FILE_OPEN_REPARSE_POINT; + if (entry->u.Open.access_mask & DELETE) + entry->u.Open.copts |= FILE_OPEN_REPARSE_POINT; entry->u.Open.srv_open = SrvOpen; if (isDataAccess(params->DesiredAccess) || isOpen2Create(params->Disposition)) entry->u.Open.open_owner_id = InterlockedIncrement(&open_owner_id);