linux/fs/lockd/netns.h
Andrey Ryabinin 0d0f4aab4e 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>
2015-10-23 15:57:27 -04:00

21 lines
347 B
C

#ifndef __LOCKD_NETNS_H__
#define __LOCKD_NETNS_H__
#include <linux/fs.h>
#include <net/netns/generic.h>
struct lockd_net {
unsigned int nlmsvc_users;
unsigned long next_gc;
unsigned long nrhosts;
struct delayed_work grace_period_end;
struct lock_manager lockd_manager;
struct list_head nsm_handles;
};
extern int lockd_net_id;
#endif