• Andreas Gruenbacher's avatar
    gfs2: Fix "Make glock lru list scanning safer" · acf1f42f
    Andreas Gruenbacher authored
    Commit 228804a3 tried to add a refcount check to
    gfs2_scan_glock_lru() to make sure that glocks that are still referenced
    cannot be freed.  It failed to account for the bias state_change() adds
    to the refcount for held glocks, so held glocks are no longer removed
    from the glock cache, which can lead to out-of-memory problems.  Fix
    that.  (The inodes those glocks are associated with do get shrunk and do
    get pushed out of memory.)
    
    In addition, use the same eligibility check in gfs2_scan_glock_lru() and
    gfs2_dispose_glock_lru().
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    acf1f42f
glock.c 74.1 KB