]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lockd: get rid of reference-counted NSM RPC clients
authorAndrey Ryabinin <aryabinin@virtuozzo.com>
Wed, 7 Oct 2015 11:39:55 +0000 (14:39 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 22 May 2016 18:10:17 +0000 (11:10 -0700)
commit38090c5316fcb4ddbd7cb23e54c0aa049a65bf15
tree0c572bd4023f8870b02621997b5523f5e2d43964
parent3059e949e65b8e85e5cc232cfb63ed253b082e00
lockd: get rid of reference-counted NSM RPC clients

Currently we have reference-counted per-net NSM RPC client
which created on the first monitor request and destroyed
after the last unmonitor request. It's needed because
RPC client need to know 'utsname()->nodename', but utsname()
might be NULL when nsm_unmonitor() called.

So instead of holding the rpc client we could just save nodename
in struct nlm_host and pass it to the rpc_create().
Thus ther is no need in keeping rpc client until last
unmonitor request. We could create separate RPC clients
for each monitor/unmonitor requests.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
(cherry picked from commit 0d0f4aab4e4d290138a4ae7f2ef8469e48c9a669)

Orabug: 23125040

Conflicts:
fs/lockd/svc.c

Signed-off-by: Thomas Tanaka <thomas.tanaka@oracle.com>
fs/lockd/host.c
fs/lockd/mon.c
fs/lockd/netns.h
fs/lockd/svc.c
include/linux/lockd/lockd.h