• Andreas Gruenbacher's avatar
    gfs2: finish_xmote cleanup · 1cd28e15
    Andreas Gruenbacher authored
    Currently, function finish_xmote() takes and releases the glock
    spinlock.  However, all of its callers immediately take that spinlock
    again, so it makes more sense to take the spin lock before calling
    finish_xmote() already.
    
    With that, thaw_glock() is the only place that sets the GLF_HAVE_REPLY
    flag outside of the glock spinlock, but it also takes that spinlock
    immediately thereafter.  Change that to set the bit when the spinlock is
    already held.  This allows to switch from test_and_clear_bit() to
    test_bit() and clear_bit() in glock_work_func().
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    1cd28e15
glock.c 74.9 KB