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 <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2012-05-14 12:03:15 -04:00 committed by Olga Kornievskaia
parent f841d14eac
commit 43af1e00b7

View file

@ -3650,6 +3650,8 @@ NTSTATUS nfs41_Create(
/* treat the NfsActOnLink ea as FILE_OPEN_REPARSE_POINT */ /* treat the NfsActOnLink ea as FILE_OPEN_REPARSE_POINT */
if (ea && AnsiStrEq(&NfsActOnLink, ea->EaName, ea->EaNameLength)) if (ea && AnsiStrEq(&NfsActOnLink, ea->EaName, ea->EaNameLength))
entry->u.Open.copts |= FILE_OPEN_REPARSE_POINT; 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; entry->u.Open.srv_open = SrvOpen;
if (isDataAccess(params->DesiredAccess) || isOpen2Create(params->Disposition)) if (isDataAccess(params->DesiredAccess) || isOpen2Create(params->Disposition))
entry->u.Open.open_owner_id = InterlockedIncrement(&open_owner_id); entry->u.Open.open_owner_id = InterlockedIncrement(&open_owner_id);