The following commit has been merged in the openafs-stable-1_8_x branch:
commit 1da00dfa9446c4c881e8659ec48a5e00262828ca
Author: Andrew Deason <[email protected]>
Date:   Mon Apr 12 18:21:23 2021 -0500

    afs: Assert avc->lock is held in afs_IAS_once
    
    Commit 3be5880d (afs: Avoid panics in afs_InvalidateAllSegments) added
    an assert to check that vcache->lock is write-locked before we call
    afs_InvalidateAllSegments_once from a background operation.
    
    However, afs_InvalidateAllSegments_once should always be called with
    vcache->lock write-locked; there's nothing specific about the
    backgrounded call that requires this. So to make sure we catch all
    cases, move this assert to afs_InvalidateAllSegments_once itself.
    
    Also remove the conditional check for WriteLocked(&avc->lock) in here,
    since clearly avc->lock must be write-locked (and actually is, since
    change Ic309e4006bf47bcb38fa2b53bf103e0c645a856d "afs: write-lock
    vcache->lock in afs_InactiveVCache").
    
    Add some comments to this function while we're here, to more clearly
    indicate what locks are needed.
    
    Reviewed-on: https://gerrit.openafs.org/14592
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Mark Vitale <[email protected]>
    Reviewed-by: Benjamin Kaduk <[email protected]>
    (cherry picked from commit 72223e0958c2d7cddd968970547dd73fc3cc1351)
    
    Change-Id: I9acf5599a8ef1e724a00cf362695fe34ca87c0bf
    Reviewed-on: https://gerrit.openafs.org/15331
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Mark Vitale <[email protected]>
    Reviewed-by: Michael Meffie <[email protected]>
    Reviewed-by: Andrew Deason <[email protected]>
    Reviewed-by: Stephan Wiesand <[email protected]>

 src/afs/afs_daemons.c  |  1 -
 src/afs/afs_segments.c | 17 +++++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

-- 
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs

Reply via email to