aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd/lockd.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-09-03 14:35:54 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-09-29 18:13:39 -0400
commit7e9d7746bfd40121438b155023793796499497d8 (patch)
tree1b2ba4e1a32d22485bcec946ef4fb6f758067a3a /include/linux/lockd/lockd.h
parent90151e6e4d00a3150d03d52170c246734b274622 (diff)
NSM: Use sockaddr_storage for sm_addr field
To store larger addresses in the nsm_handle structure, make sm_addr a sockaddr_storage. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/lockd/lockd.h')
-rw-r--r--include/linux/lockd/lockd.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 964e6c93830f..b1dfa0b1d1bc 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -71,7 +71,8 @@ struct nsm_handle {
71 struct list_head sm_link; 71 struct list_head sm_link;
72 atomic_t sm_count; 72 atomic_t sm_count;
73 char * sm_name; 73 char * sm_name;
74 struct sockaddr_in sm_addr; 74 struct sockaddr_storage sm_addr;
75 size_t sm_addrlen;
75 unsigned int sm_monitored : 1, 76 unsigned int sm_monitored : 1,
76 sm_sticky : 1; /* don't unmonitor */ 77 sm_sticky : 1; /* don't unmonitor */
77 char sm_addrbuf[48]; /* address eyecatcher */ 78 char sm_addrbuf[48]; /* address eyecatcher */
@@ -100,6 +101,16 @@ static inline struct sockaddr *nlm_srcaddr(const struct nlm_host *host)
100 return (struct sockaddr *)&host->h_srcaddr; 101 return (struct sockaddr *)&host->h_srcaddr;
101} 102}
102 103
104static inline struct sockaddr_in *nsm_addr_in(const struct nsm_handle *handle)
105{
106 return (struct sockaddr_in *)&handle->sm_addr;
107}
108
109static inline struct sockaddr *nsm_addr(const struct nsm_handle *handle)
110{
111 return (struct sockaddr *)&handle->sm_addr;
112}
113
103/* 114/*
104 * Map an fl_owner_t into a unique 32-bit "pid" 115 * Map an fl_owner_t into a unique 32-bit "pid"
105 */ 116 */