• Steven Whitehouse's avatar
    GFS2: Fix glock refcount issues · 26bb7505
    Steven Whitehouse authored
    This patch fixes some ref counting issues. Firstly by moving
    the point at which we drop the ref count after a dlm lock
    operation has completed we ensure that we never call
    gfs2_glock_hold() on a lock with a zero ref count.
    
    Secondly, by using atomic_dec_and_lock() in gfs2_glock_put()
    we ensure that at no time will a glock with zero ref count
    appear on the lru_list. That means that we can remove the
    check for this in our shrinker (which was racy).
    Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
    26bb7505
glock.c 46.3 KB