NFSd: Move default initialisers from create_client() to alloc_client()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 18 Apr 2014 18:43:56 +0000 (14:43 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 9 Jun 2014 12:29:08 +0000 (13:29 +0100)
commit9f8b7c3919e494881697db355b8b8b33400d740e
treee386b7b468274872120189eb01ae5b78ae1ab613
parent27d3d94d680fd29fb2a0946e404f9ba3bc524f0d
NFSd: Move default initialisers from create_client() to alloc_client()

commit 5694c93e6c4954fa9424c215f75eeb919bddad64 upstream.

Aside from making it clearer what is non-trivial in create_client(), it
also fixes a bug whereby we can call free_client() before idr_init()
has been called.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
[bwh: Backported to 3.2:
 - Adjust context
 - Also move initialisation of nfs4_client::cl_strhash, but
   not nfs4_client::cl_revoked]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/nfsd/nfs4state.c