aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:45 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:45 -0500
commit92737230dd3f1478033819d4bc20339f8da852da (patch)
tree27bc7804a077a29b7614c698bb02632dc4ce228e /include/linux/lockd
parente4cd038a45a46ffbe06a1a72f3f15246e5b041ca (diff)
NLM: Add nlmclnt_release_call
Add a helper function to simplify the freeing of NLM client requests. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/lockd')
-rw-r--r--include/linux/lockd/lockd.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index cb9933d04091..e7ba8110d579 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -86,8 +86,9 @@ struct nlm_rqst {
86 struct nlm_host * a_host; /* host handle */ 86 struct nlm_host * a_host; /* host handle */
87 struct nlm_args a_args; /* arguments */ 87 struct nlm_args a_args; /* arguments */
88 struct nlm_res a_res; /* result */ 88 struct nlm_res a_res; /* result */
89 struct nlm_block * a_block;
89 unsigned int a_retries; /* Retry count */ 90 unsigned int a_retries; /* Retry count */
90 char a_owner[NLMCLNT_OHSIZE]; 91 u8 a_owner[NLMCLNT_OHSIZE];
91}; 92};
92 93
93/* 94/*
@@ -115,7 +116,7 @@ struct nlm_block {
115 struct kref b_count; /* Reference count */ 116 struct kref b_count; /* Reference count */
116 struct nlm_block * b_next; /* linked list (all blocks) */ 117 struct nlm_block * b_next; /* linked list (all blocks) */
117 struct nlm_block * b_fnext; /* linked list (per file) */ 118 struct nlm_block * b_fnext; /* linked list (per file) */
118 struct nlm_rqst b_call; /* RPC args & callback info */ 119 struct nlm_rqst * b_call; /* RPC args & callback info */
119 struct svc_serv * b_daemon; /* NLM service */ 120 struct svc_serv * b_daemon; /* NLM service */
120 struct nlm_host * b_host; /* host handle for RPC clnt */ 121 struct nlm_host * b_host; /* host handle for RPC clnt */
121 unsigned long b_when; /* next re-xmit */ 122 unsigned long b_when; /* next re-xmit */
@@ -147,7 +148,9 @@ extern unsigned long nlmsvc_timeout;
147/* 148/*
148 * Lockd client functions 149 * Lockd client functions
149 */ 150 */
150struct nlm_rqst * nlmclnt_alloc_call(void); 151struct nlm_rqst * nlm_alloc_call(struct nlm_host *host);
152void nlm_release_call(struct nlm_rqst *);
153int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *);
151struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); 154struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
152void nlmclnt_finish_block(struct nlm_wait *block); 155void nlmclnt_finish_block(struct nlm_wait *block);
153int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); 156int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout);
@@ -172,7 +175,6 @@ extern struct nlm_host *nlm_find_client(void);
172/* 175/*
173 * Server-side lock handling 176 * Server-side lock handling
174 */ 177 */
175int nlmsvc_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *);
176u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, 178u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *,
177 struct nlm_lock *, int, struct nlm_cookie *); 179 struct nlm_lock *, int, struct nlm_cookie *);
178u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); 180u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *);