diff options
Diffstat (limited to 'net/rds/connection.c')
| -rw-r--r-- | net/rds/connection.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c index abef75da89a7..cfb05953b0e5 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c | |||
| @@ -659,11 +659,19 @@ static void rds_conn_info(struct socket *sock, unsigned int len, | |||
| 659 | 659 | ||
| 660 | int rds_conn_init(void) | 660 | int rds_conn_init(void) |
| 661 | { | 661 | { |
| 662 | int ret; | ||
| 663 | |||
| 664 | ret = rds_loop_net_init(); /* register pernet callback */ | ||
| 665 | if (ret) | ||
| 666 | return ret; | ||
| 667 | |||
| 662 | rds_conn_slab = kmem_cache_create("rds_connection", | 668 | rds_conn_slab = kmem_cache_create("rds_connection", |
| 663 | sizeof(struct rds_connection), | 669 | sizeof(struct rds_connection), |
| 664 | 0, 0, NULL); | 670 | 0, 0, NULL); |
| 665 | if (!rds_conn_slab) | 671 | if (!rds_conn_slab) { |
| 672 | rds_loop_net_exit(); | ||
| 666 | return -ENOMEM; | 673 | return -ENOMEM; |
| 674 | } | ||
| 667 | 675 | ||
| 668 | rds_info_register_func(RDS_INFO_CONNECTIONS, rds_conn_info); | 676 | rds_info_register_func(RDS_INFO_CONNECTIONS, rds_conn_info); |
| 669 | rds_info_register_func(RDS_INFO_SEND_MESSAGES, | 677 | rds_info_register_func(RDS_INFO_SEND_MESSAGES, |
| @@ -676,6 +684,7 @@ int rds_conn_init(void) | |||
| 676 | 684 | ||
| 677 | void rds_conn_exit(void) | 685 | void rds_conn_exit(void) |
| 678 | { | 686 | { |
| 687 | rds_loop_net_exit(); /* unregister pernet callback */ | ||
| 679 | rds_loop_exit(); | 688 | rds_loop_exit(); |
| 680 | 689 | ||
| 681 | WARN_ON(!hlist_empty(rds_conn_hash)); | 690 | WARN_ON(!hlist_empty(rds_conn_hash)); |
