]> git.baikalelectronics.ru Git - kernel.git/commit
lockd: Add nlm_alloc_host()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Dec 2010 15:05:23 +0000 (15:05 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 16 Dec 2010 17:37:26 +0000 (12:37 -0500)
commit2e2c7ace69dd7a7fc9423a48db1a2a4499bc18b2
tree0b622ff71d92abb3f6ec3d09fc3ed9c3624282ed
parent865bd2b77a8ecd477637fdb1f0d50e0d54cb3420
lockd: Add nlm_alloc_host()

Refactor nlm_host allocation and initialization into a separate
function.  This will be the common piece of server and client nlm_host
lookup logic after the nlm_host cache is split.

Small change: use kmalloc() instead of kzalloc(), as we're overwriting
almost all fields in the new nlm_host struct with non-zero values
immediately after it is allocated.  An added benefit is we now have an
explicit reference to each field name where it is initialized (for all
you cscope fans out there).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/lockd/host.c