diff options
Diffstat (limited to 'fs/cifs/cifsglob.h')
| -rw-r--r-- | fs/cifs/cifsglob.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 5bfb75346cb..edd5b29b53c 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
| @@ -166,6 +166,9 @@ struct TCP_Server_Info { | |||
| 166 | struct socket *ssocket; | 166 | struct socket *ssocket; |
| 167 | struct sockaddr_storage dstaddr; | 167 | struct sockaddr_storage dstaddr; |
| 168 | struct sockaddr_storage srcaddr; /* locally bind to this IP */ | 168 | struct sockaddr_storage srcaddr; /* locally bind to this IP */ |
| 169 | #ifdef CONFIG_NET_NS | ||
| 170 | struct net *net; | ||
| 171 | #endif | ||
| 169 | wait_queue_head_t response_q; | 172 | wait_queue_head_t response_q; |
| 170 | wait_queue_head_t request_q; /* if more than maxmpx to srvr must block*/ | 173 | wait_queue_head_t request_q; /* if more than maxmpx to srvr must block*/ |
| 171 | struct list_head pending_mid_q; | 174 | struct list_head pending_mid_q; |
| @@ -217,6 +220,36 @@ struct TCP_Server_Info { | |||
| 217 | }; | 220 | }; |
| 218 | 221 | ||
| 219 | /* | 222 | /* |
| 223 | * Macros to allow the TCP_Server_Info->net field and related code to drop out | ||
| 224 | * when CONFIG_NET_NS isn't set. | ||
| 225 | */ | ||
| 226 | |||
| 227 | #ifdef CONFIG_NET_NS | ||
| 228 | |||
| 229 | static inline struct net *cifs_net_ns(struct TCP_Server_Info *srv) | ||
| 230 | { | ||
| 231 | return srv->net; | ||
| 232 | } | ||
| 233 | |||
| 234 | static inline void cifs_set_net_ns(struct TCP_Server_Info *srv, struct net *net) | ||
| 235 | { | ||
| 236 | srv->net = net; | ||
| 237 | } | ||
| 238 | |||
| 239 | #else | ||
| 240 | |||
| 241 | static inline struct net *cifs_net_ns(struct TCP_Server_Info *srv) | ||
| 242 | { | ||
| 243 | return &init_net; | ||
| 244 | } | ||
| 245 | |||
| 246 | static inline void cifs_set_net_ns(struct TCP_Server_Info *srv, struct net *net) | ||
| 247 | { | ||
| 248 | } | ||
| 249 | |||
| 250 | #endif | ||
| 251 | |||
| 252 | /* | ||
| 220 | * Session structure. One of these for each uid session with a particular host | 253 | * Session structure. One of these for each uid session with a particular host |
| 221 | */ | 254 | */ |
| 222 | struct cifsSesInfo { | 255 | struct cifsSesInfo { |
