OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-158-gf1674f4

Gerrit Code Review gerrit@openafs.org
Tue, 25 Feb 2025 12:24:35 -0500


The following commit has been merged in the master branch:
commit f1674f471382221633cc98a2c3d29d1033f3a7ad
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Mon Feb 24 10:02:32 2025 -0600

    viced: Avoid H_LOCK right before h_Lock_r
    
    A few places in viced do something like this:
    
        H_LOCK;
        h_Lock_r(host);
    
    But h_Lock_r(host) is just:
    
        H_UNLOCK;
        h_Lock(host);
        H_LOCK;
    
    So expanding h_Lock_r(host), this code looks like:
    
        H_LOCK;
        H_UNLOCK;
        h_Lock(host);
        H_LOCK;
    
    Which contains a nonsensical extra lock. Replace these pieces of code
    with:
    
        h_Lock(host);
        H_LOCK;
    
    which just avoids one extra lock acquisition. To make the code appear
    more balanced, also change our unlocks to call H_UNLOCK and h_Unlock(),
    in that order.
    
    Change-Id: I49da94a9fa15f36ddab0f4135bf1838c257df8d5
    Reviewed-on: https://gerrit.openafs.org/16292
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 src/viced/callback.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

-- 
OpenAFS Master Repository