Commit 8529bc51d30b8f001734b29b21a51b579c260f5b

Authored by Chuck Lever
Committed by J. Bruce Fields
1 parent e6765b8397

NSM: Move nsm_addr() to fs/lockd/mon.c

Clean up: nsm_addr_in() is no longer used, and nsm_addr() is used only in
fs/lockd/mon.c, so move it there.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

Showing 2 changed files with 5 additions and 10 deletions Side-by-side Diff

... ... @@ -55,6 +55,11 @@
55 55 */
56 56 int nsm_local_state;
57 57  
  58 +static inline struct sockaddr *nsm_addr(const struct nsm_handle *nsm)
  59 +{
  60 + return (struct sockaddr *)&nsm->sm_addr;
  61 +}
  62 +
58 63 static void nsm_display_ipv4_address(const struct sockaddr *sap, char *buf,
59 64 const size_t len)
60 65 {
include/linux/lockd/lockd.h
... ... @@ -112,16 +112,6 @@
112 112 return (struct sockaddr *)&host->h_srcaddr;
113 113 }
114 114  
115   -static inline struct sockaddr_in *nsm_addr_in(const struct nsm_handle *handle)
116   -{
117   - return (struct sockaddr_in *)&handle->sm_addr;
118   -}
119   -
120   -static inline struct sockaddr *nsm_addr(const struct nsm_handle *handle)
121   -{
122   - return (struct sockaddr *)&handle->sm_addr;
123   -}
124   -
125 115 /*
126 116 * Map an fl_owner_t into a unique 32-bit "pid"
127 117 */