diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat_ioctl.c | 2 | ||||
-rw-r--r-- | fs/dlm/lowcomms.c | 22 |
2 files changed, 9 insertions, 15 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index a26bea10e81b..10d8cd90ca6f 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
35 | #include <linux/file.h> | 35 | #include <linux/file.h> |
36 | #include <linux/ppp_defs.h> | 36 | #include <linux/ppp_defs.h> |
37 | #include <linux/if_ppp.h> | 37 | #include <linux/ppp-ioctl.h> |
38 | #include <linux/if_pppox.h> | 38 | #include <linux/if_pppox.h> |
39 | #include <linux/mtio.h> | 39 | #include <linux/mtio.h> |
40 | #include <linux/auto_fs.h> | 40 | #include <linux/auto_fs.h> |
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 0b3109ee4257..ca0c59a4246c 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/mutex.h> | 52 | #include <linux/mutex.h> |
53 | #include <linux/sctp.h> | 53 | #include <linux/sctp.h> |
54 | #include <linux/slab.h> | 54 | #include <linux/slab.h> |
55 | #include <net/sctp/sctp.h> | ||
55 | #include <net/sctp/user.h> | 56 | #include <net/sctp/user.h> |
56 | #include <net/ipv6.h> | 57 | #include <net/ipv6.h> |
57 | 58 | ||
@@ -474,9 +475,6 @@ static void process_sctp_notification(struct connection *con, | |||
474 | int prim_len, ret; | 475 | int prim_len, ret; |
475 | int addr_len; | 476 | int addr_len; |
476 | struct connection *new_con; | 477 | struct connection *new_con; |
477 | sctp_peeloff_arg_t parg; | ||
478 | int parglen = sizeof(parg); | ||
479 | int err; | ||
480 | 478 | ||
481 | /* | 479 | /* |
482 | * We get this before any data for an association. | 480 | * We get this before any data for an association. |
@@ -525,23 +523,19 @@ static void process_sctp_notification(struct connection *con, | |||
525 | return; | 523 | return; |
526 | 524 | ||
527 | /* Peel off a new sock */ | 525 | /* Peel off a new sock */ |
528 | parg.associd = sn->sn_assoc_change.sac_assoc_id; | 526 | sctp_lock_sock(con->sock->sk); |
529 | ret = kernel_getsockopt(con->sock, IPPROTO_SCTP, | 527 | ret = sctp_do_peeloff(con->sock->sk, |
530 | SCTP_SOCKOPT_PEELOFF, | 528 | sn->sn_assoc_change.sac_assoc_id, |
531 | (void *)&parg, &parglen); | 529 | &new_con->sock); |
530 | sctp_release_sock(con->sock->sk); | ||
532 | if (ret < 0) { | 531 | if (ret < 0) { |
533 | log_print("Can't peel off a socket for " | 532 | log_print("Can't peel off a socket for " |
534 | "connection %d to node %d: err=%d", | 533 | "connection %d to node %d: err=%d", |
535 | parg.associd, nodeid, ret); | 534 | (int)sn->sn_assoc_change.sac_assoc_id, |
536 | return; | 535 | nodeid, ret); |
537 | } | ||
538 | new_con->sock = sockfd_lookup(parg.sd, &err); | ||
539 | if (!new_con->sock) { | ||
540 | log_print("sockfd_lookup error %d", err); | ||
541 | return; | 536 | return; |
542 | } | 537 | } |
543 | add_sock(new_con->sock, new_con); | 538 | add_sock(new_con->sock, new_con); |
544 | sockfd_put(new_con->sock); | ||
545 | 539 | ||
546 | log_print("connecting to %d sctp association %d", | 540 | log_print("connecting to %d sctp association %d", |
547 | nodeid, (int)sn->sn_assoc_change.sac_assoc_id); | 541 | nodeid, (int)sn->sn_assoc_change.sac_assoc_id); |