diff options
Diffstat (limited to 'net/iucv')
-rw-r--r-- | net/iucv/af_iucv.c | 10 | ||||
-rw-r--r-- | net/iucv/iucv.c | 16 |
2 files changed, 18 insertions, 8 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index bada1b9c670b..1e428863574f 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
@@ -428,7 +428,6 @@ static void iucv_sock_close(struct sock *sk) | |||
428 | break; | 428 | break; |
429 | 429 | ||
430 | default: | 430 | default: |
431 | sock_set_flag(sk, SOCK_ZAPPED); | ||
432 | /* nothing to do here */ | 431 | /* nothing to do here */ |
433 | break; | 432 | break; |
434 | } | 433 | } |
@@ -482,7 +481,8 @@ static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio) | |||
482 | } | 481 | } |
483 | 482 | ||
484 | /* Create an IUCV socket */ | 483 | /* Create an IUCV socket */ |
485 | static int iucv_sock_create(struct net *net, struct socket *sock, int protocol) | 484 | static int iucv_sock_create(struct net *net, struct socket *sock, int protocol, |
485 | int kern) | ||
486 | { | 486 | { |
487 | struct sock *sk; | 487 | struct sock *sk; |
488 | 488 | ||
@@ -536,7 +536,7 @@ void iucv_accept_enqueue(struct sock *parent, struct sock *sk) | |||
536 | list_add_tail(&iucv_sk(sk)->accept_q, &par->accept_q); | 536 | list_add_tail(&iucv_sk(sk)->accept_q, &par->accept_q); |
537 | spin_unlock_irqrestore(&par->accept_q_lock, flags); | 537 | spin_unlock_irqrestore(&par->accept_q_lock, flags); |
538 | iucv_sk(sk)->parent = parent; | 538 | iucv_sk(sk)->parent = parent; |
539 | parent->sk_ack_backlog++; | 539 | sk_acceptq_added(parent); |
540 | } | 540 | } |
541 | 541 | ||
542 | void iucv_accept_unlink(struct sock *sk) | 542 | void iucv_accept_unlink(struct sock *sk) |
@@ -547,7 +547,7 @@ void iucv_accept_unlink(struct sock *sk) | |||
547 | spin_lock_irqsave(&par->accept_q_lock, flags); | 547 | spin_lock_irqsave(&par->accept_q_lock, flags); |
548 | list_del_init(&iucv_sk(sk)->accept_q); | 548 | list_del_init(&iucv_sk(sk)->accept_q); |
549 | spin_unlock_irqrestore(&par->accept_q_lock, flags); | 549 | spin_unlock_irqrestore(&par->accept_q_lock, flags); |
550 | iucv_sk(sk)->parent->sk_ack_backlog--; | 550 | sk_acceptq_removed(iucv_sk(sk)->parent); |
551 | iucv_sk(sk)->parent = NULL; | 551 | iucv_sk(sk)->parent = NULL; |
552 | sock_put(sk); | 552 | sock_put(sk); |
553 | } | 553 | } |
@@ -1715,7 +1715,7 @@ static const struct proto_ops iucv_sock_ops = { | |||
1715 | .getsockopt = iucv_sock_getsockopt, | 1715 | .getsockopt = iucv_sock_getsockopt, |
1716 | }; | 1716 | }; |
1717 | 1717 | ||
1718 | static struct net_proto_family iucv_sock_family_ops = { | 1718 | static const struct net_proto_family iucv_sock_family_ops = { |
1719 | .family = AF_IUCV, | 1719 | .family = AF_IUCV, |
1720 | .owner = THIS_MODULE, | 1720 | .owner = THIS_MODULE, |
1721 | .create = iucv_sock_create, | 1721 | .create = iucv_sock_create, |
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 3973d0e61e56..3b1f5f5f8de7 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
@@ -1768,7 +1768,6 @@ static void iucv_tasklet_fn(unsigned long ignored) | |||
1768 | */ | 1768 | */ |
1769 | static void iucv_work_fn(struct work_struct *work) | 1769 | static void iucv_work_fn(struct work_struct *work) |
1770 | { | 1770 | { |
1771 | typedef void iucv_irq_fn(struct iucv_irq_data *); | ||
1772 | LIST_HEAD(work_queue); | 1771 | LIST_HEAD(work_queue); |
1773 | struct iucv_irq_list *p, *n; | 1772 | struct iucv_irq_list *p, *n; |
1774 | 1773 | ||
@@ -1878,14 +1877,25 @@ int iucv_path_table_empty(void) | |||
1878 | static int iucv_pm_freeze(struct device *dev) | 1877 | static int iucv_pm_freeze(struct device *dev) |
1879 | { | 1878 | { |
1880 | int cpu; | 1879 | int cpu; |
1880 | struct iucv_irq_list *p, *n; | ||
1881 | int rc = 0; | 1881 | int rc = 0; |
1882 | 1882 | ||
1883 | #ifdef CONFIG_PM_DEBUG | 1883 | #ifdef CONFIG_PM_DEBUG |
1884 | printk(KERN_WARNING "iucv_pm_freeze\n"); | 1884 | printk(KERN_WARNING "iucv_pm_freeze\n"); |
1885 | #endif | 1885 | #endif |
1886 | if (iucv_pm_state != IUCV_PM_FREEZING) { | ||
1887 | for_each_cpu_mask_nr(cpu, iucv_irq_cpumask) | ||
1888 | smp_call_function_single(cpu, iucv_block_cpu_almost, | ||
1889 | NULL, 1); | ||
1890 | cancel_work_sync(&iucv_work); | ||
1891 | list_for_each_entry_safe(p, n, &iucv_work_queue, list) { | ||
1892 | list_del_init(&p->list); | ||
1893 | iucv_sever_pathid(p->data.ippathid, | ||
1894 | iucv_error_no_listener); | ||
1895 | kfree(p); | ||
1896 | } | ||
1897 | } | ||
1886 | iucv_pm_state = IUCV_PM_FREEZING; | 1898 | iucv_pm_state = IUCV_PM_FREEZING; |
1887 | for_each_cpu_mask_nr(cpu, iucv_irq_cpumask) | ||
1888 | smp_call_function_single(cpu, iucv_block_cpu_almost, NULL, 1); | ||
1889 | if (dev->driver && dev->driver->pm && dev->driver->pm->freeze) | 1899 | if (dev->driver && dev->driver->pm && dev->driver->pm->freeze) |
1890 | rc = dev->driver->pm->freeze(dev); | 1900 | rc = dev->driver->pm->freeze(dev); |
1891 | if (iucv_path_table_empty()) | 1901 | if (iucv_path_table_empty()) |