File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -758,6 +758,7 @@ void rds_conn_destroy(struct rds_connection *conn, int shutdown)
758
758
759
759
atomic_dec (& conn -> c_trans -> t_conn_count );
760
760
761
+ put_net (conn -> c_net );
761
762
kfree (conn -> c_path );
762
763
kmem_cache_free (rds_conn_slab , conn );
763
764
}
Original file line number Diff line number Diff line change @@ -369,7 +369,7 @@ struct rds_connection {
369
369
/* Protocol version */
370
370
unsigned int c_proposed_version ;
371
371
unsigned int c_version ;
372
- possible_net_t c_net ;
372
+ struct net * c_net ;
373
373
374
374
/* Re-connect stall diagnostics */
375
375
unsigned long c_reconnect_start ;
@@ -404,14 +404,13 @@ struct rds_connection {
404
404
static inline
405
405
struct net * rds_conn_net (struct rds_connection * conn )
406
406
{
407
- return read_pnet ( & conn -> c_net ) ;
407
+ return conn -> c_net ;
408
408
}
409
409
410
410
static inline
411
411
void rds_conn_net_set (struct rds_connection * conn , struct net * net )
412
412
{
413
- /* Once set, never changed. */
414
- write_pnet (& conn -> c_net , net );
413
+ conn -> c_net = get_net (net );
415
414
}
416
415
417
416
#define RDS_FLAG_CONG_BITMAP 0x01
Original file line number Diff line number Diff line change @@ -608,7 +608,9 @@ static void rds_tcp_kill_sock(struct net *net, struct rds_tcp_net *rtn)
608
608
sock_release (rtn -> rds_tcp_accepted_sock );
609
609
spin_lock_irq (& rds_tcp_conn_lock );
610
610
list_for_each_entry_safe (tc , _tc , & rds_tcp_conn_list , t_tcp_node ) {
611
- if (!net_eq (net , rds_conn_net (tc -> t_cpath -> cp_conn )))
611
+ struct net * c_net = tc -> t_cpath -> cp_conn -> c_net ;
612
+
613
+ if (net != c_net )
612
614
continue ;
613
615
if (!list_has_conn (& tmp_list , tc -> t_cpath -> cp_conn ))
614
616
list_move_tail (& tc -> t_tcp_node , & tmp_list );
@@ -663,8 +665,9 @@ static void rds_tcp_sysctl_reset(struct net *net)
663
665
664
666
spin_lock_irq (& rds_tcp_conn_lock );
665
667
list_for_each_entry_safe (tc , _tc , & rds_tcp_conn_list , t_tcp_node ) {
666
- if (!net_eq (net , rds_conn_net (tc -> t_cpath -> cp_conn )) ||
667
- !tc -> t_sock )
668
+ struct net * c_net = tc -> t_cpath -> cp_conn -> c_net ;
669
+
670
+ if (net != c_net || !tc -> t_sock )
668
671
continue ;
669
672
670
673
/* reconnect with new parameters */
You can’t perform that action at this time.
0 commit comments