]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4: Don't try to reclaim unused state owners
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 2 Oct 2015 15:11:16 +0000 (11:11 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 2 Oct 2015 19:43:07 +0000 (15:43 -0400)
commit8dc31736c1dc4727c935fe4ea6e432f9664d1410
tree2af06095b536fdd8cf0bff7e549a8d34fb87c651
parent1c98fc773a01139b8822bdf7b5391dd3164e9d91
NFSv4: Don't try to reclaim unused state owners

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: Andrew W Elble <aweits@rit.edu>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4state.c