aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/lockd
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'include/linux/lockd')
-rw-r--r--include/linux/lockd/bind.h5
-rw-r--r--include/linux/lockd/lockd.h21
-rw-r--r--include/linux/lockd/xdr4.h2
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
55extern int nlmclnt_proc(struct nlm_host *host, int cmd, 54extern int nlmclnt_proc(struct nlm_host *host, int cmd,
56 struct file_lock *fl); 55 struct file_lock *fl);
57extern int lockd_up(struct net *net); 56extern int lockd_up(void);
58extern void lockd_down(struct net *net); 57extern 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 */
192extern const struct rpc_program nlm_program; 191extern struct rpc_program nlm_program;
193extern struct svc_procedure nlmsvc_procedures[]; 192extern struct svc_procedure nlmsvc_procedures[];
194#ifdef CONFIG_LOCKD_V4 193#ifdef CONFIG_LOCKD_V4
195extern struct svc_procedure nlmsvc_procedures4[]; 194extern struct svc_procedure nlmsvc_procedures4[];
196#endif 195#endif
197extern int nlmsvc_grace_period; 196extern int nlmsvc_grace_period;
198extern unsigned long nlmsvc_timeout; 197extern unsigned long nlmsvc_timeout;
199extern bool nsm_use_hostnames; 198extern int nsm_use_hostnames;
200extern u32 nsm_local_state; 199extern 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);
228void nlmclnt_release_host(struct nlm_host *); 226void nlmclnt_release_host(struct nlm_host *);
229struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, 227struct 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 *);
234void nlm_rebind_host(struct nlm_host *); 232void nlm_rebind_host(struct nlm_host *);
235struct nlm_host * nlm_get_host(struct nlm_host *); 233struct nlm_host * nlm_get_host(struct nlm_host *);
236void nlm_shutdown_hosts(void); 234void nlm_shutdown_hosts(void);
237void nlm_shutdown_hosts_net(struct net *net);
238void nlm_host_rebooted(const struct nlm_reboot *); 235void 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 *);
270unsigned long nlmsvc_retry_blocked(void); 267unsigned long nlmsvc_retry_blocked(void);
271void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, 268void 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 *);
281void nlm_release_file(struct nlm_file *); 278void nlm_release_file(struct nlm_file *);
282void nlmsvc_mark_resources(struct net *); 279void nlmsvc_mark_resources(void);
283void nlmsvc_free_host_resources(struct nlm_host *); 280void nlmsvc_free_host_resources(struct nlm_host *);
284void nlmsvc_invalidate_all(void); 281void 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)
308static inline int __nlm_privileged_request6(const struct sockaddr *sap) 305static 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) */
321static inline int __nlm_privileged_request6(const struct sockaddr *sap) 318static 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 *);
42int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *); 42int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
43int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *); 43int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
44 */ 44 */
45extern const struct rpc_version nlm_version4; 45extern struct rpc_version nlm_version4;
46 46
47#endif /* LOCKD_XDR4_H */ 47#endif /* LOCKD_XDR4_H */