mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: Take FCB resource in presection create.
Fix a lock inversion in the paging query file information path (called from within section create). The query file takes the FCB resource, but that is a lower rank lock than the SOP resource which is taken in AcquireFileForNtCreateSection, We fix the inversion by grabbing the FCB resource in AcquireFileForNtCreateSection. Change-Id: I6ea8d2ebf9d454f78469e86765ae36e1993533b2 Reviewed-on: http://gerrit.openafs.org/10190 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
1dc051294c
commit
40d93cb9df
@ -264,6 +264,15 @@ AFSFastIoAcquireFile( IN struct _FILE_OBJECT *FileObject)
|
|||||||
|
|
||||||
AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
|
AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
|
||||||
AFS_TRACE_LEVEL_VERBOSE,
|
AFS_TRACE_LEVEL_VERBOSE,
|
||||||
|
"AFSFastIoAcquireFile Acquiring Fcb lock %p EXCL %08lX\n",
|
||||||
|
&pFcb->NPFcb->Resource,
|
||||||
|
PsGetCurrentThread()));
|
||||||
|
|
||||||
|
AFSAcquireExcl( &pFcb->NPFcb->Resource,
|
||||||
|
TRUE);
|
||||||
|
|
||||||
|
AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
|
||||||
|
AFS_TRACE_LEVEL_VERBOSE,
|
||||||
"AFSFastIoAcquireFile Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
|
"AFSFastIoAcquireFile Acquiring Fcb SectionObject lock %p EXCL %08lX\n",
|
||||||
&pFcb->NPFcb->SectionObjectResource,
|
&pFcb->NPFcb->SectionObjectResource,
|
||||||
PsGetCurrentThread()));
|
PsGetCurrentThread()));
|
||||||
@ -293,6 +302,17 @@ AFSFastIoReleaseFile( IN struct _FILE_OBJECT *FileObject)
|
|||||||
|
|
||||||
AFSFcb *pFcb = (AFSFcb *)FileObject->FsContext;
|
AFSFcb *pFcb = (AFSFcb *)FileObject->FsContext;
|
||||||
|
|
||||||
|
if( ExIsResourceAcquiredExclusiveLite( &pFcb->NPFcb->Resource))
|
||||||
|
{
|
||||||
|
AFSDbgTrace(( AFS_SUBSYSTEM_LOCK_PROCESSING,
|
||||||
|
AFS_TRACE_LEVEL_VERBOSE,
|
||||||
|
"AFSFastIoReleaseFile Releasing Fcb Lock %p EXCL %08lX\n",
|
||||||
|
&pFcb->NPFcb->Resource,
|
||||||
|
PsGetCurrentThread()));
|
||||||
|
|
||||||
|
AFSReleaseResource( &pFcb->NPFcb->Resource);
|
||||||
|
}
|
||||||
|
|
||||||
if( ExIsResourceAcquiredExclusiveLite( &pFcb->NPFcb->SectionObjectResource))
|
if( ExIsResourceAcquiredExclusiveLite( &pFcb->NPFcb->SectionObjectResource))
|
||||||
{
|
{
|
||||||
PFILE_OBJECT fileObject = pFcb->Specific.File.SectionCreateFO;
|
PFILE_OBJECT fileObject = pFcb->Specific.File.SectionCreateFO;
|
||||||
|
Loading…
Reference in New Issue
Block a user