connection.c (c13aca79ff3c4af5fd31a5b2743a90eba6e36a26) | connection.c (c809195f5523dd4d09403bbb1c9732d548aa0d1e) |
---|---|
1/* 2 * Copyright (c) 2006 Oracle. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 645 unchanged lines hidden (view full) --- 654 rds_walk_conn_path_info(sock, len, iter, lens, 655 rds_conn_info_visitor, 656 buffer, 657 sizeof(struct rds_info_connection)); 658} 659 660int rds_conn_init(void) 661{ | 1/* 2 * Copyright (c) 2006 Oracle. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 645 unchanged lines hidden (view full) --- 654 rds_walk_conn_path_info(sock, len, iter, lens, 655 rds_conn_info_visitor, 656 buffer, 657 sizeof(struct rds_info_connection)); 658} 659 660int rds_conn_init(void) 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", 663 sizeof(struct rds_connection), 664 0, 0, NULL); | 668 rds_conn_slab = kmem_cache_create("rds_connection", 669 sizeof(struct rds_connection), 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 668 rds_info_register_func(RDS_INFO_CONNECTIONS, rds_conn_info); 669 rds_info_register_func(RDS_INFO_SEND_MESSAGES, 670 rds_conn_message_info_send); 671 rds_info_register_func(RDS_INFO_RETRANS_MESSAGES, 672 rds_conn_message_info_retrans); 673 674 return 0; 675} 676 677void rds_conn_exit(void) 678{ | 675 676 rds_info_register_func(RDS_INFO_CONNECTIONS, rds_conn_info); 677 rds_info_register_func(RDS_INFO_SEND_MESSAGES, 678 rds_conn_message_info_send); 679 rds_info_register_func(RDS_INFO_RETRANS_MESSAGES, 680 rds_conn_message_info_retrans); 681 682 return 0; 683} 684 685void rds_conn_exit(void) 686{ |
687 rds_loop_net_exit(); /* unregister pernet callback */ |
|
679 rds_loop_exit(); 680 681 WARN_ON(!hlist_empty(rds_conn_hash)); 682 683 kmem_cache_destroy(rds_conn_slab); 684 685 rds_info_deregister_func(RDS_INFO_CONNECTIONS, rds_conn_info); 686 rds_info_deregister_func(RDS_INFO_SEND_MESSAGES, --- 65 unchanged lines hidden --- | 688 rds_loop_exit(); 689 690 WARN_ON(!hlist_empty(rds_conn_hash)); 691 692 kmem_cache_destroy(rds_conn_slab); 693 694 rds_info_deregister_func(RDS_INFO_CONNECTIONS, rds_conn_info); 695 rds_info_deregister_func(RDS_INFO_SEND_MESSAGES, --- 65 unchanged lines hidden --- |