diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-11-04 23:37:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-07 03:46:40 -0500 |
commit | b215c57dcc847b15693899d26aa0ee4669dacefb (patch) | |
tree | dbb8c24a8ef494a016b0fc87ac74716347030f79 /include/linux/net.h | |
parent | 91774904fbf0fe1c71441dd8299342a4654f7103 (diff) |
net: kill proto_ops wrapper
All users of wrapped proto_ops are now gone, so we can safely remove
the wrappers as well.
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/net.h')
-rw-r--r-- | include/linux/net.h | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 70ee3c310f15..6ce87663551c 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -268,89 +268,6 @@ extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); | |||
268 | extern int kernel_sock_shutdown(struct socket *sock, | 268 | extern int kernel_sock_shutdown(struct socket *sock, |
269 | enum sock_shutdown_cmd how); | 269 | enum sock_shutdown_cmd how); |
270 | 270 | ||
271 | #ifndef CONFIG_SMP | ||
272 | #define SOCKOPS_WRAPPED(name) name | ||
273 | #define SOCKOPS_WRAP(name, fam) | ||
274 | #else | ||
275 | |||
276 | #define SOCKOPS_WRAPPED(name) __unlocked_##name | ||
277 | |||
278 | #define SOCKCALL_WRAP(name, call, parms, args) \ | ||
279 | static int __lock_##name##_##call parms \ | ||
280 | { \ | ||
281 | int ret; \ | ||
282 | lock_kernel(); \ | ||
283 | ret = __unlocked_##name##_ops.call args ;\ | ||
284 | unlock_kernel(); \ | ||
285 | return ret; \ | ||
286 | } | ||
287 | |||
288 | #define SOCKCALL_UWRAP(name, call, parms, args) \ | ||
289 | static unsigned int __lock_##name##_##call parms \ | ||
290 | { \ | ||
291 | int ret; \ | ||
292 | lock_kernel(); \ | ||
293 | ret = __unlocked_##name##_ops.call args ;\ | ||
294 | unlock_kernel(); \ | ||
295 | return ret; \ | ||
296 | } | ||
297 | |||
298 | |||
299 | #define SOCKOPS_WRAP(name, fam) \ | ||
300 | SOCKCALL_WRAP(name, release, (struct socket *sock), (sock)) \ | ||
301 | SOCKCALL_WRAP(name, bind, (struct socket *sock, struct sockaddr *uaddr, int addr_len), \ | ||
302 | (sock, uaddr, addr_len)) \ | ||
303 | SOCKCALL_WRAP(name, connect, (struct socket *sock, struct sockaddr * uaddr, \ | ||
304 | int addr_len, int flags), \ | ||
305 | (sock, uaddr, addr_len, flags)) \ | ||
306 | SOCKCALL_WRAP(name, socketpair, (struct socket *sock1, struct socket *sock2), \ | ||
307 | (sock1, sock2)) \ | ||
308 | SOCKCALL_WRAP(name, accept, (struct socket *sock, struct socket *newsock, \ | ||
309 | int flags), (sock, newsock, flags)) \ | ||
310 | SOCKCALL_WRAP(name, getname, (struct socket *sock, struct sockaddr *uaddr, \ | ||
311 | int *addr_len, int peer), (sock, uaddr, addr_len, peer)) \ | ||
312 | SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_table_struct *wait), \ | ||
313 | (file, sock, wait)) \ | ||
314 | SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \ | ||
315 | unsigned long arg), (sock, cmd, arg)) \ | ||
316 | SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \ | ||
317 | unsigned long arg), (sock, cmd, arg)) \ | ||
318 | SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ | ||
319 | SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ | ||
320 | SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ | ||
321 | char __user *optval, unsigned int optlen), (sock, level, optname, optval, optlen)) \ | ||
322 | SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \ | ||
323 | char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \ | ||
324 | SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \ | ||
325 | (iocb, sock, m, len)) \ | ||
326 | SOCKCALL_WRAP(name, recvmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len, int flags), \ | ||
327 | (iocb, sock, m, len, flags)) \ | ||
328 | SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \ | ||
329 | (file, sock, vma)) \ | ||
330 | \ | ||
331 | static const struct proto_ops name##_ops = { \ | ||
332 | .family = fam, \ | ||
333 | .owner = THIS_MODULE, \ | ||
334 | .release = __lock_##name##_release, \ | ||
335 | .bind = __lock_##name##_bind, \ | ||
336 | .connect = __lock_##name##_connect, \ | ||
337 | .socketpair = __lock_##name##_socketpair, \ | ||
338 | .accept = __lock_##name##_accept, \ | ||
339 | .getname = __lock_##name##_getname, \ | ||
340 | .poll = __lock_##name##_poll, \ | ||
341 | .ioctl = __lock_##name##_ioctl, \ | ||
342 | .compat_ioctl = __lock_##name##_compat_ioctl, \ | ||
343 | .listen = __lock_##name##_listen, \ | ||
344 | .shutdown = __lock_##name##_shutdown, \ | ||
345 | .setsockopt = __lock_##name##_setsockopt, \ | ||
346 | .getsockopt = __lock_##name##_getsockopt, \ | ||
347 | .sendmsg = __lock_##name##_sendmsg, \ | ||
348 | .recvmsg = __lock_##name##_recvmsg, \ | ||
349 | .mmap = __lock_##name##_mmap, \ | ||
350 | }; | ||
351 | |||
352 | #endif | ||
353 | |||
354 | #define MODULE_ALIAS_NETPROTO(proto) \ | 271 | #define MODULE_ALIAS_NETPROTO(proto) \ |
355 | MODULE_ALIAS("net-pf-" __stringify(proto)) | 272 | MODULE_ALIAS("net-pf-" __stringify(proto)) |
356 | 273 | ||