diff options
Diffstat (limited to 'include/linux/lockd')
-rw-r--r-- | include/linux/lockd/bind.h | 5 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 16 | ||||
-rw-r--r-- | include/linux/lockd/share.h | 4 | ||||
-rw-r--r-- | include/linux/lockd/xdr.h | 30 | ||||
-rw-r--r-- | include/linux/lockd/xdr4.h | 26 |
5 files changed, 44 insertions, 37 deletions
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 81e3a185f951..aa50d89eacd7 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
@@ -10,6 +10,11 @@ | |||
10 | #define LINUX_LOCKD_BIND_H | 10 | #define LINUX_LOCKD_BIND_H |
11 | 11 | ||
12 | #include <linux/lockd/nlm.h> | 12 | #include <linux/lockd/nlm.h> |
13 | /* need xdr-encoded error codes too, so... */ | ||
14 | #include <linux/lockd/xdr.h> | ||
15 | #ifdef CONFIG_LOCKD_V4 | ||
16 | #include <linux/lockd/xdr4.h> | ||
17 | #endif | ||
13 | 18 | ||
14 | /* Dummy declarations */ | 19 | /* Dummy declarations */ |
15 | struct svc_rqst; | 20 | struct svc_rqst; |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 2909619c0295..0c962b82a9de 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -154,7 +154,7 @@ int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *); | |||
154 | struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); | 154 | struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl); |
155 | void nlmclnt_finish_block(struct nlm_wait *block); | 155 | void nlmclnt_finish_block(struct nlm_wait *block); |
156 | int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); | 156 | int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout); |
157 | u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *); | 157 | __be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *); |
158 | void nlmclnt_recovery(struct nlm_host *); | 158 | void nlmclnt_recovery(struct nlm_host *); |
159 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); | 159 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); |
160 | void nlmclnt_next_cookie(struct nlm_cookie *); | 160 | void nlmclnt_next_cookie(struct nlm_cookie *); |
@@ -164,14 +164,12 @@ void nlmclnt_next_cookie(struct nlm_cookie *); | |||
164 | */ | 164 | */ |
165 | struct nlm_host * nlmclnt_lookup_host(const struct sockaddr_in *, int, int, const char *, int); | 165 | struct nlm_host * nlmclnt_lookup_host(const struct sockaddr_in *, int, int, const char *, int); |
166 | struct nlm_host * nlmsvc_lookup_host(struct svc_rqst *, const char *, int); | 166 | struct nlm_host * nlmsvc_lookup_host(struct svc_rqst *, const char *, int); |
167 | struct nlm_host * nlm_lookup_host(int server, const struct sockaddr_in *, int, int, const char *, int); | ||
168 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); | 167 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); |
169 | void nlm_rebind_host(struct nlm_host *); | 168 | void nlm_rebind_host(struct nlm_host *); |
170 | struct nlm_host * nlm_get_host(struct nlm_host *); | 169 | struct nlm_host * nlm_get_host(struct nlm_host *); |
171 | void nlm_release_host(struct nlm_host *); | 170 | void nlm_release_host(struct nlm_host *); |
172 | void nlm_shutdown_hosts(void); | 171 | void nlm_shutdown_hosts(void); |
173 | extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, int, u32); | 172 | extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, int, u32); |
174 | struct nsm_handle *nsm_find(const struct sockaddr_in *, const char *, int); | ||
175 | void nsm_release(struct nsm_handle *); | 173 | void nsm_release(struct nsm_handle *); |
176 | 174 | ||
177 | 175 | ||
@@ -184,12 +182,12 @@ typedef int (*nlm_host_match_fn_t)(struct nlm_host *cur, struct nlm_host *ref) | |||
184 | /* | 182 | /* |
185 | * Server-side lock handling | 183 | * Server-side lock handling |
186 | */ | 184 | */ |
187 | u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, | 185 | __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, |
188 | struct nlm_lock *, int, struct nlm_cookie *); | 186 | struct nlm_lock *, int, struct nlm_cookie *); |
189 | u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); | 187 | __be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); |
190 | u32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *, | 188 | __be32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *, |
191 | struct nlm_lock *); | 189 | struct nlm_lock *); |
192 | u32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); | 190 | __be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); |
193 | unsigned long nlmsvc_retry_blocked(void); | 191 | unsigned long nlmsvc_retry_blocked(void); |
194 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, | 192 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, |
195 | nlm_host_match_fn_t match); | 193 | nlm_host_match_fn_t match); |
@@ -198,7 +196,7 @@ void nlmsvc_grant_reply(struct nlm_cookie *, u32); | |||
198 | /* | 196 | /* |
199 | * File handling for the server personality | 197 | * File handling for the server personality |
200 | */ | 198 | */ |
201 | u32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, | 199 | __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, |
202 | struct nfs_fh *); | 200 | struct nfs_fh *); |
203 | void nlm_release_file(struct nlm_file *); | 201 | void nlm_release_file(struct nlm_file *); |
204 | void nlmsvc_mark_resources(void); | 202 | void nlmsvc_mark_resources(void); |
@@ -208,7 +206,7 @@ void nlmsvc_invalidate_all(void); | |||
208 | static __inline__ struct inode * | 206 | static __inline__ struct inode * |
209 | nlmsvc_file_inode(struct nlm_file *file) | 207 | nlmsvc_file_inode(struct nlm_file *file) |
210 | { | 208 | { |
211 | return file->f_file->f_dentry->d_inode; | 209 | return file->f_file->f_path.dentry->d_inode; |
212 | } | 210 | } |
213 | 211 | ||
214 | /* | 212 | /* |
diff --git a/include/linux/lockd/share.h b/include/linux/lockd/share.h index cd7816e74c05..630c5bf69b07 100644 --- a/include/linux/lockd/share.h +++ b/include/linux/lockd/share.h | |||
@@ -21,9 +21,9 @@ struct nlm_share { | |||
21 | u32 s_mode; /* deny mode */ | 21 | u32 s_mode; /* deny mode */ |
22 | }; | 22 | }; |
23 | 23 | ||
24 | u32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *, | 24 | __be32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *, |
25 | struct nlm_args *); | 25 | struct nlm_args *); |
26 | u32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *, | 26 | __be32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *, |
27 | struct nlm_args *); | 27 | struct nlm_args *); |
28 | void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, | 28 | void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, |
29 | nlm_host_match_fn_t); | 29 | nlm_host_match_fn_t); |
diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index bb0a0f1caa91..29e7d9fc9dad 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/nfs.h> | 13 | #include <linux/nfs.h> |
14 | #include <linux/sunrpc/xdr.h> | 14 | #include <linux/sunrpc/xdr.h> |
15 | 15 | ||
16 | struct svc_rqst; | ||
17 | |||
16 | #define NLM_MAXCOOKIELEN 32 | 18 | #define NLM_MAXCOOKIELEN 32 |
17 | #define NLM_MAXSTRLEN 1024 | 19 | #define NLM_MAXSTRLEN 1024 |
18 | 20 | ||
@@ -22,6 +24,8 @@ | |||
22 | #define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED) | 24 | #define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED) |
23 | #define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD) | 25 | #define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD) |
24 | 26 | ||
27 | #define nlm_drop_reply __constant_htonl(30000) | ||
28 | |||
25 | /* Lock info passed via NLM */ | 29 | /* Lock info passed via NLM */ |
26 | struct nlm_lock { | 30 | struct nlm_lock { |
27 | char * caller; | 31 | char * caller; |
@@ -86,19 +90,19 @@ struct nlm_reboot { | |||
86 | */ | 90 | */ |
87 | #define NLMSVC_XDRSIZE sizeof(struct nlm_args) | 91 | #define NLMSVC_XDRSIZE sizeof(struct nlm_args) |
88 | 92 | ||
89 | int nlmsvc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *); | 93 | int nlmsvc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
90 | int nlmsvc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *); | 94 | int nlmsvc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *); |
91 | int nlmsvc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *); | 95 | int nlmsvc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
92 | int nlmsvc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *); | 96 | int nlmsvc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
93 | int nlmsvc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *); | 97 | int nlmsvc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
94 | int nlmsvc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *); | 98 | int nlmsvc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *); |
95 | int nlmsvc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *); | 99 | int nlmsvc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *); |
96 | int nlmsvc_encode_void(struct svc_rqst *, u32 *, void *); | 100 | int nlmsvc_encode_void(struct svc_rqst *, __be32 *, void *); |
97 | int nlmsvc_decode_void(struct svc_rqst *, u32 *, void *); | 101 | int nlmsvc_decode_void(struct svc_rqst *, __be32 *, void *); |
98 | int nlmsvc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *); | 102 | int nlmsvc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
99 | int nlmsvc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *); | 103 | int nlmsvc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *); |
100 | int nlmsvc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *); | 104 | int nlmsvc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *); |
101 | int nlmsvc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *); | 105 | int nlmsvc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *); |
102 | /* | 106 | /* |
103 | int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 107 | int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
104 | int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 108 | int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h index 3cc1ae25009b..dd12b4c9e613 100644 --- a/include/linux/lockd/xdr4.h +++ b/include/linux/lockd/xdr4.h | |||
@@ -23,19 +23,19 @@ | |||
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | int nlm4svc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *); | 26 | int nlm4svc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
27 | int nlm4svc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *); | 27 | int nlm4svc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *); |
28 | int nlm4svc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *); | 28 | int nlm4svc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
29 | int nlm4svc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *); | 29 | int nlm4svc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
30 | int nlm4svc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *); | 30 | int nlm4svc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
31 | int nlm4svc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *); | 31 | int nlm4svc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *); |
32 | int nlm4svc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *); | 32 | int nlm4svc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *); |
33 | int nlm4svc_encode_void(struct svc_rqst *, u32 *, void *); | 33 | int nlm4svc_encode_void(struct svc_rqst *, __be32 *, void *); |
34 | int nlm4svc_decode_void(struct svc_rqst *, u32 *, void *); | 34 | int nlm4svc_decode_void(struct svc_rqst *, __be32 *, void *); |
35 | int nlm4svc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *); | 35 | int nlm4svc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *); |
36 | int nlm4svc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *); | 36 | int nlm4svc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *); |
37 | int nlm4svc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *); | 37 | int nlm4svc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *); |
38 | int nlm4svc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *); | 38 | int nlm4svc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *); |
39 | /* | 39 | /* |
40 | int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 40 | int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
41 | int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 41 | int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); |