Skip to content
  • Trond Myklebust's avatar
    NFSv4: Don't try to reclaim unused state owners · 4a0954ef
    Trond Myklebust authored
    
    
    Currently, we don't test if the state owner is in use before we try to
    recover it. The problem is that if the refcount is zero, then the
    state owner will be waiting on the lru list for garbage collection.
    The expectation in that case is that if you bump the refcount, then
    you must also remove the state owner from the lru list. Otherwise
    the call to nfs4_put_state_owner will corrupt that list by trying
    to add our state owner a second time.
    
    Avoid the whole problem by just skipping state owners that hold no
    state.
    
    Reported-by: default avatarAndrew W Elble <aweits@rit.edu>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
    4a0954ef