Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFS: add a sysfs link to the lockd rpc_client

After lockd is started, add a symlink for lockd's rpc_client under
NFS' superblock sysfs.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>

authored by

Benjamin Coddington and committed by
Trond Myklebust
d97c0589 e13b5493

+9
+6
fs/lockd/clntlock.c
··· 93 93 block->b_status = nlm_lck_blocked; 94 94 } 95 95 96 + struct rpc_clnt *nlmclnt_rpc_clnt(struct nlm_host *host) 97 + { 98 + return host->h_rpcclnt; 99 + } 100 + EXPORT_SYMBOL_GPL(nlmclnt_rpc_clnt); 101 + 96 102 /* 97 103 * Queue up a lock for blocking so that the GRANTED request can see it 98 104 */
+1
fs/nfs/client.c
··· 599 599 600 600 server->nlm_host = host; 601 601 server->destroy = nfs_destroy_server; 602 + nfs_sysfs_link_rpc_client(server, nlmclnt_rpc_clnt(host), NULL); 602 603 return 0; 603 604 } 604 605
+2
include/linux/lockd/bind.h
··· 20 20 /* Dummy declarations */ 21 21 struct svc_rqst; 22 22 struct rpc_task; 23 + struct rpc_clnt; 23 24 24 25 /* 25 26 * This is the set of functions for lockd->nfsd communication ··· 57 56 58 57 extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init); 59 58 extern void nlmclnt_done(struct nlm_host *host); 59 + extern struct rpc_clnt *nlmclnt_rpc_clnt(struct nlm_host *host); 60 60 61 61 /* 62 62 * NLM client operations provide a means to modify RPC processing of NLM