Skip to content

Commit 98e87bc

Browse files
HeisSpiterJoachimHenze
authored andcommitted
[0.4.9] cherry-pick [FASTFAT] Lock DirResource on flush in case we're updating entry
CORE-14660 (cherry picked from commit 9f3169b)
1 parent ae5aa9c commit 98e87bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/filesystems/fastfat/flush.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ VfatFlushFile(
3333
IoStatus.Status = STATUS_SUCCESS;
3434
}
3535

36+
ExAcquireResourceExclusiveLite(&DeviceExt->DirResource, TRUE);
3637
if (BooleanFlagOn(Fcb->Flags, FCB_IS_DIRTY))
3738
{
3839
Status = VfatUpdateEntry(DeviceExt, Fcb);
@@ -41,6 +42,8 @@ VfatFlushFile(
4142
IoStatus.Status = Status;
4243
}
4344
}
45+
ExReleaseResourceLite(&DeviceExt->DirResource);
46+
4447
return IoStatus.Status;
4548
}
4649

0 commit comments

Comments
 (0)