Commit f85d881
committed
Cygwin: open: always fix up cached DOS file attributes after NtCreateFile
If two threads try to create a file in parallel, only one of them
actually creates the file. So even if both threads first found the
file non-existant, fhandler_base::open will get io.Information ==
FILE_CREATED from NtCreateFile in one thread only, and the thread
just opening the just created file will continue with broken DOS file
attributes.
Make sure to fix up DOS attributes all the time, not only when the file
got created by this thread, but also when it has been just opened.
Fixes: 41de4b6 ("Cygwin: fix up cached DOS file attributes after file creation")
Signed-off-by: Corinna Vinschen <[email protected]>
(cherry picked from commit 2d81f6e)1 parent d9ebf01 commit f85d881
2 files changed
+30
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
529 | 530 | | |
530 | | - | |
| 531 | + | |
531 | 532 | | |
532 | 533 | | |
533 | 534 | | |
| |||
719 | 720 | | |
720 | 721 | | |
721 | 722 | | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
726 | 727 | | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
731 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
732 | 749 | | |
733 | 750 | | |
734 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
0 commit comments