nfsd: Ensure stateids remain unique until they are freed
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 16 Jul 2014 14:31:59 +0000 (10:31 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 17 Jul 2014 01:39:51 +0000 (21:39 -0400)
commitb0fc29d6fcd0310a8437123fe6f30b1ae60a62f9
tree6b89ae1cfd87d7fea0289ac5d6ac9ec2c3fbc63f
parentd564fbec7a8fa22d4b1ad10249eace42ea01513b
nfsd: Ensure stateids remain unique until they are freed

Add an extra delegation state to allow the stateid to remain in the idr
tree until the last reference has been released. This will be necessary
to ensure uniqueness once the client_mutex is removed.

[jlayton: reset the sc_type under the state_lock in unhash_delegation]

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c
fs/nfsd/state.h