File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
drivers/filesystems/fastfat Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1552,6 +1552,7 @@ VfatSetInformation(
1552
1552
PVFATFCB FCB ;
1553
1553
NTSTATUS Status = STATUS_SUCCESS ;
1554
1554
PVOID SystemBuffer ;
1555
+ BOOLEAN LockDir ;
1555
1556
1556
1557
/* PRECONDITION */
1557
1558
ASSERT (IrpContext );
@@ -1593,7 +1594,14 @@ VfatSetInformation(
1593
1594
DPRINT ("Can set file size\n" );
1594
1595
}
1595
1596
1596
- if (FileInformationClass == FileRenameInformation )
1597
+ LockDir = FALSE;
1598
+ if (FileInformationClass == FileRenameInformation || FileInformationClass == FileAllocationInformation ||
1599
+ FileInformationClass == FileEndOfFileInformation || FileInformationClass == FileBasicInformation )
1600
+ {
1601
+ LockDir = TRUE;
1602
+ }
1603
+
1604
+ if (LockDir )
1597
1605
{
1598
1606
if (!ExAcquireResourceExclusiveLite (& ((PDEVICE_EXTENSION )IrpContext -> DeviceObject -> DeviceExtension )-> DirResource ,
1599
1607
BooleanFlagOn (IrpContext -> Flags , IRPCONTEXT_CANWAIT )))
@@ -1607,7 +1615,7 @@ VfatSetInformation(
1607
1615
if (!ExAcquireResourceExclusiveLite (& FCB -> MainResource ,
1608
1616
BooleanFlagOn (IrpContext -> Flags , IRPCONTEXT_CANWAIT )))
1609
1617
{
1610
- if (FileInformationClass == FileRenameInformation )
1618
+ if (LockDir )
1611
1619
{
1612
1620
ExReleaseResourceLite (& ((PDEVICE_EXTENSION )IrpContext -> DeviceObject -> DeviceExtension )-> DirResource );
1613
1621
}
@@ -1662,7 +1670,7 @@ VfatSetInformation(
1662
1670
ExReleaseResourceLite (& FCB -> MainResource );
1663
1671
}
1664
1672
1665
- if (FileInformationClass == FileRenameInformation )
1673
+ if (LockDir )
1666
1674
{
1667
1675
ExReleaseResourceLite (& ((PDEVICE_EXTENSION )IrpContext -> DeviceObject -> DeviceExtension )-> DirResource );
1668
1676
}
You can’t perform that action at this time.
0 commit comments