]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: clarify that renewing expired client is a bug
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 4 May 2012 18:57:52 +0000 (14:57 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 1 Jun 2012 00:30:14 +0000 (20:30 -0400)
commite2c369f4b63c51ac55a0455e5045b03c395d5821
tree9764abcab312590c1ede8981a7e69998955bbfdb
parente48b1b56595fa7788761cf2d650c9ae73b02dc79
nfsd4: clarify that renewing expired client is a bug

This can't happen:
- cl_time is zeroed only by unhash_client_locked, which is only
  ever called under both the state lock and the client lock.
- every caller of renew_client() should have looked up a
  (non-expired) client and then called renew_client() all
  without dropping the state lock.
- the only other caller of renew_client_locked() is
  release_session_client(), which first checks under the
  client_lock that the cl_time is nonzero.

So make it clear that this is a bug, not something we handle.  I can't
quite bring myself to make this a BUG(), though, as there are a lot of
renew_client() callers, and returning here is probably safer than a
BUG().

We'll consider making it a BUG() after some more cleanup.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c