mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
Cygwin: FILE_OPEN_NO_RECALL is incompatible with FILE_DIRECTORY_FILE
If FILE_DIRECTORY_FILE is given, FILE_OPEN_NO_RECALL is not allowed, otherwise NtCreateFile returns STATUS_INVALID_PARAMETER. Drop FILE_OPEN_NO_RECALL where FILE_DIRECTORY_FILE is specified. Fixes: f6b56abec186 ("Cygwin: try to avoid recalling offline files") Reported-by: Bruce Jerrick <bmj001@gmail.com> Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
ed50a50b9b
commit
56e7563b9a
@ -325,7 +325,6 @@ fhandler_base::fstat_by_name (struct stat *buf)
|
||||
status = NtOpenFile (&dir, SYNCHRONIZE | FILE_LIST_DIRECTORY,
|
||||
&attr, &io, FILE_SHARE_VALID_FLAGS,
|
||||
FILE_SYNCHRONOUS_IO_NONALERT
|
||||
| FILE_OPEN_NO_RECALL
|
||||
| FILE_OPEN_FOR_BACKUP_INTENT
|
||||
| FILE_DIRECTORY_FILE);
|
||||
if (!NT_SUCCESS (status))
|
||||
|
@ -608,7 +608,6 @@ getfileattr (const char *path, bool caseinsensitive) /* path has to be always ab
|
||||
status = NtOpenFile (&dir, SYNCHRONIZE | FILE_LIST_DIRECTORY,
|
||||
&attr, &io, FILE_SHARE_VALID_FLAGS,
|
||||
FILE_SYNCHRONOUS_IO_NONALERT
|
||||
| FILE_OPEN_NO_RECALL
|
||||
| FILE_OPEN_FOR_BACKUP_INTENT
|
||||
| FILE_DIRECTORY_FILE);
|
||||
if (NT_SUCCESS (status))
|
||||
@ -3340,7 +3339,6 @@ restart:
|
||||
status = NtOpenFile (&dir, SYNCHRONIZE | FILE_LIST_DIRECTORY,
|
||||
&dattr, &io, FILE_SHARE_VALID_FLAGS,
|
||||
FILE_SYNCHRONOUS_IO_NONALERT
|
||||
| FILE_OPEN_NO_RECALL
|
||||
| FILE_OPEN_FOR_BACKUP_INTENT
|
||||
| FILE_DIRECTORY_FILE);
|
||||
if (!NT_SUCCESS (status))
|
||||
|
6
winsup/cygwin/release/3.5.4
Normal file
6
winsup/cygwin/release/3.5.4
Normal file
@ -0,0 +1,6 @@
|
||||
Fixes:
|
||||
------
|
||||
|
||||
- Fix regression in 3.5.3 which fails to open files for stat(2) if the
|
||||
file is opened exclusively by another process.
|
||||
Addresses: https://cygwin.com/pipermail/cygwin/2024-April/255811.html
|
Loading…
x
Reference in New Issue
Block a user