https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9f3169b295a03d13c38eb3...
commit 9f3169b295a03d13c38eb3a9cdb7cbe0e770c76c Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Mon May 28 09:01:39 2018 +0200 Commit: Pierre Schweitzer pierre@reactos.org CommitDate: Mon May 28 19:37:56 2018 +0200
[FASTFAT] Lock DirResource on flush in case we're updating entry
CORE-14660 --- drivers/filesystems/fastfat/flush.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/filesystems/fastfat/flush.c b/drivers/filesystems/fastfat/flush.c index ebf1925172..22a8c6d08f 100644 --- a/drivers/filesystems/fastfat/flush.c +++ b/drivers/filesystems/fastfat/flush.c @@ -33,6 +33,7 @@ VfatFlushFile( IoStatus.Status = STATUS_SUCCESS; }
+ ExAcquireResourceExclusiveLite(&DeviceExt->DirResource, TRUE); if (BooleanFlagOn(Fcb->Flags, FCB_IS_DIRTY)) { Status = VfatUpdateEntry(DeviceExt, Fcb); @@ -41,6 +42,8 @@ VfatFlushFile( IoStatus.Status = Status; } } + ExReleaseResourceLite(&DeviceExt->DirResource); + return IoStatus.Status; }