diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/lockd | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'include/linux/lockd')
-rw-r--r-- | include/linux/lockd/bind.h | 5 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 21 | ||||
-rw-r--r-- | include/linux/lockd/xdr4.h | 2 |
3 files changed, 12 insertions, 16 deletions
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 4d24d64578c..fbc48f89852 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
@@ -42,7 +42,6 @@ struct nlmclnt_initdata { | |||
42 | unsigned short protocol; | 42 | unsigned short protocol; |
43 | u32 nfs_version; | 43 | u32 nfs_version; |
44 | int noresvport; | 44 | int noresvport; |
45 | struct net *net; | ||
46 | }; | 45 | }; |
47 | 46 | ||
48 | /* | 47 | /* |
@@ -54,7 +53,7 @@ extern void nlmclnt_done(struct nlm_host *host); | |||
54 | 53 | ||
55 | extern int nlmclnt_proc(struct nlm_host *host, int cmd, | 54 | extern int nlmclnt_proc(struct nlm_host *host, int cmd, |
56 | struct file_lock *fl); | 55 | struct file_lock *fl); |
57 | extern int lockd_up(struct net *net); | 56 | extern int lockd_up(void); |
58 | extern void lockd_down(struct net *net); | 57 | extern void lockd_down(void); |
59 | 58 | ||
60 | #endif /* LINUX_LOCKD_BIND_H */ | 59 | #endif /* LINUX_LOCKD_BIND_H */ |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index f5a051a7927..ff9abff55aa 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -67,7 +67,6 @@ struct nlm_host { | |||
67 | struct list_head h_reclaim; /* Locks in RECLAIM state */ | 67 | struct list_head h_reclaim; /* Locks in RECLAIM state */ |
68 | struct nsm_handle *h_nsmhandle; /* NSM status handle */ | 68 | struct nsm_handle *h_nsmhandle; /* NSM status handle */ |
69 | char *h_addrbuf; /* address eyecatcher */ | 69 | char *h_addrbuf; /* address eyecatcher */ |
70 | struct net *net; /* host net */ | ||
71 | }; | 70 | }; |
72 | 71 | ||
73 | /* | 72 | /* |
@@ -189,14 +188,14 @@ struct nlm_block { | |||
189 | /* | 188 | /* |
190 | * Global variables | 189 | * Global variables |
191 | */ | 190 | */ |
192 | extern const struct rpc_program nlm_program; | 191 | extern struct rpc_program nlm_program; |
193 | extern struct svc_procedure nlmsvc_procedures[]; | 192 | extern struct svc_procedure nlmsvc_procedures[]; |
194 | #ifdef CONFIG_LOCKD_V4 | 193 | #ifdef CONFIG_LOCKD_V4 |
195 | extern struct svc_procedure nlmsvc_procedures4[]; | 194 | extern struct svc_procedure nlmsvc_procedures4[]; |
196 | #endif | 195 | #endif |
197 | extern int nlmsvc_grace_period; | 196 | extern int nlmsvc_grace_period; |
198 | extern unsigned long nlmsvc_timeout; | 197 | extern unsigned long nlmsvc_timeout; |
199 | extern bool nsm_use_hostnames; | 198 | extern int nsm_use_hostnames; |
200 | extern u32 nsm_local_state; | 199 | extern u32 nsm_local_state; |
201 | 200 | ||
202 | /* | 201 | /* |
@@ -223,8 +222,7 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, | |||
223 | const unsigned short protocol, | 222 | const unsigned short protocol, |
224 | const u32 version, | 223 | const u32 version, |
225 | const char *hostname, | 224 | const char *hostname, |
226 | int noresvport, | 225 | int noresvport); |
227 | struct net *net); | ||
228 | void nlmclnt_release_host(struct nlm_host *); | 226 | void nlmclnt_release_host(struct nlm_host *); |
229 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, | 227 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, |
230 | const char *hostname, | 228 | const char *hostname, |
@@ -234,7 +232,6 @@ struct rpc_clnt * nlm_bind_host(struct nlm_host *); | |||
234 | void nlm_rebind_host(struct nlm_host *); | 232 | void nlm_rebind_host(struct nlm_host *); |
235 | struct nlm_host * nlm_get_host(struct nlm_host *); | 233 | struct nlm_host * nlm_get_host(struct nlm_host *); |
236 | void nlm_shutdown_hosts(void); | 234 | void nlm_shutdown_hosts(void); |
237 | void nlm_shutdown_hosts_net(struct net *net); | ||
238 | void nlm_host_rebooted(const struct nlm_reboot *); | 235 | void nlm_host_rebooted(const struct nlm_reboot *); |
239 | 236 | ||
240 | /* | 237 | /* |
@@ -262,11 +259,11 @@ typedef int (*nlm_host_match_fn_t)(void *cur, struct nlm_host *ref); | |||
262 | __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, | 259 | __be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, |
263 | struct nlm_host *, struct nlm_lock *, int, | 260 | struct nlm_host *, struct nlm_lock *, int, |
264 | struct nlm_cookie *, int); | 261 | struct nlm_cookie *, int); |
265 | __be32 nlmsvc_unlock(struct net *net, struct nlm_file *, struct nlm_lock *); | 262 | __be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); |
266 | __be32 nlmsvc_testlock(struct svc_rqst *, struct nlm_file *, | 263 | __be32 nlmsvc_testlock(struct svc_rqst *, struct nlm_file *, |
267 | struct nlm_host *, struct nlm_lock *, | 264 | struct nlm_host *, struct nlm_lock *, |
268 | struct nlm_lock *, struct nlm_cookie *); | 265 | struct nlm_lock *, struct nlm_cookie *); |
269 | __be32 nlmsvc_cancel_blocked(struct net *net, struct nlm_file *, struct nlm_lock *); | 266 | __be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *); |
270 | unsigned long nlmsvc_retry_blocked(void); | 267 | unsigned long nlmsvc_retry_blocked(void); |
271 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, | 268 | void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, |
272 | nlm_host_match_fn_t match); | 269 | nlm_host_match_fn_t match); |
@@ -279,7 +276,7 @@ void nlmsvc_release_call(struct nlm_rqst *); | |||
279 | __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, | 276 | __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, |
280 | struct nfs_fh *); | 277 | struct nfs_fh *); |
281 | void nlm_release_file(struct nlm_file *); | 278 | void nlm_release_file(struct nlm_file *); |
282 | void nlmsvc_mark_resources(struct net *); | 279 | void nlmsvc_mark_resources(void); |
283 | void nlmsvc_free_host_resources(struct nlm_host *); | 280 | void nlmsvc_free_host_resources(struct nlm_host *); |
284 | void nlmsvc_invalidate_all(void); | 281 | void nlmsvc_invalidate_all(void); |
285 | 282 | ||
@@ -304,7 +301,7 @@ static inline int __nlm_privileged_request4(const struct sockaddr *sap) | |||
304 | return ipv4_is_loopback(sin->sin_addr.s_addr); | 301 | return ipv4_is_loopback(sin->sin_addr.s_addr); |
305 | } | 302 | } |
306 | 303 | ||
307 | #if IS_ENABLED(CONFIG_IPV6) | 304 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
308 | static inline int __nlm_privileged_request6(const struct sockaddr *sap) | 305 | static inline int __nlm_privileged_request6(const struct sockaddr *sap) |
309 | { | 306 | { |
310 | const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; | 307 | const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; |
@@ -317,12 +314,12 @@ static inline int __nlm_privileged_request6(const struct sockaddr *sap) | |||
317 | 314 | ||
318 | return ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LOOPBACK; | 315 | return ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LOOPBACK; |
319 | } | 316 | } |
320 | #else /* IS_ENABLED(CONFIG_IPV6) */ | 317 | #else /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ |
321 | static inline int __nlm_privileged_request6(const struct sockaddr *sap) | 318 | static inline int __nlm_privileged_request6(const struct sockaddr *sap) |
322 | { | 319 | { |
323 | return 0; | 320 | return 0; |
324 | } | 321 | } |
325 | #endif /* IS_ENABLED(CONFIG_IPV6) */ | 322 | #endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ |
326 | 323 | ||
327 | /* | 324 | /* |
328 | * Ensure incoming requests are from local privileged callers. | 325 | * Ensure incoming requests are from local privileged callers. |
diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h index e58c88b52ce..7353821341e 100644 --- a/include/linux/lockd/xdr4.h +++ b/include/linux/lockd/xdr4.h | |||
@@ -42,6 +42,6 @@ int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | |||
42 | int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 42 | int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
43 | int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 43 | int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
44 | */ | 44 | */ |
45 | extern const struct rpc_version nlm_version4; | 45 | extern struct rpc_version nlm_version4; |
46 | 46 | ||
47 | #endif /* LOCKD_XDR4_H */ | 47 | #endif /* LOCKD_XDR4_H */ |