nfsd4: delay session removal till free_client
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 12 Oct 2010 23:55:25 +0000 (19:55 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 21 Oct 2010 14:11:56 +0000 (10:11 -0400)
commit792c95dd519c54d6b0fd6401b3da7ea67b0d6b72
tree1bd872c92be9fcc8790e5c68d8acb2ababc0b241
parent5a3c9d71343cf27b7afef24ed312368d48dada09
nfsd4: delay session removal till free_client

Have unhash_client_locked() remove client and associated sessions from
global hashes, but delay further dismantling till free_client().

(After unhash_client_locked(), the only remaining references outside the
destroying thread are from any connections which have xpt_user callbacks
registered.)

This will simplify locking on session destruction.

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