• Bob Peterson's avatar
    gfs2: do_promote glock holder stealing fix · 0befb851
    Bob Peterson authored
    In do_promote(), when the glock had no strong holders, we were
    accidentally calling demote_incompat_holders() with new_gh == NULL, so
    no weak holders were considered incompatible.  Instead, the new holder
    should have been passed in.
    
    For doing that, the HIF_HOLDER flag needs to be set in new_gh to prevent
    may_grant() from complaining.  This means that the new holder will now
    be recognized as a current holder, so skip over it explicitly in
    demote_incompat_holders() to prevent it from being dequeued.
    
    To further clarify things, we can now rename new_gh to current_gh in
    demote_incompat_holders(); after all, the HIF_HOLDER flag is already set,
    which means the new holder is already a current holder.
    Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    0befb851
glock.c 70.9 KB