nfsd: Add reference counting to the lock and open stateids
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 30 Jul 2014 01:34:06 +0000 (21:34 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 31 Jul 2014 16:43:53 +0000 (12:43 -0400)
commit6011695da2d7c588f2dfe57c318758f0bf1154dd
tree30c9d21250bb486ce5f300ada41711c44d5c29a9
parentb3fbfe0e7a1d88e3cbaa282c5f6fc50e8c67448c
nfsd: Add reference counting to the lock and open stateids

When we remove the client_mutex, we'll need to be able to ensure that
these objects aren't destroyed while we're not holding locks.

Add a ->free() callback to the struct nfs4_stid, so that we can
release a reference to the stid without caring about the contents.

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