File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ struct kcm_sock {
71
71
struct list_head wait_psock_list ;
72
72
struct sk_buff * seq_skb ;
73
73
struct mutex tx_mutex ;
74
- u32 tx_stopped : 1 ;
75
74
76
75
/* Don't use bit fields here, these are set under different locks */
77
76
bool tx_wait ;
Original file line number Diff line number Diff line change @@ -429,7 +429,7 @@ static void psock_write_space(struct sock *sk)
429
429
430
430
/* Check if the socket is reserved so someone is waiting for sending. */
431
431
kcm = psock -> tx_kcm ;
432
- if (kcm && ! unlikely ( kcm -> tx_stopped ) )
432
+ if (kcm )
433
433
queue_work (kcm_wq , & kcm -> tx_work );
434
434
435
435
spin_unlock_bh (& mux -> lock );
@@ -1696,12 +1696,6 @@ static int kcm_release(struct socket *sock)
1696
1696
*/
1697
1697
__skb_queue_purge (& sk -> sk_write_queue );
1698
1698
1699
- /* Set tx_stopped. This is checked when psock is bound to a kcm and we
1700
- * get a writespace callback. This prevents further work being queued
1701
- * from the callback (unbinding the psock occurs after canceling work.
1702
- */
1703
- kcm -> tx_stopped = 1 ;
1704
-
1705
1699
release_sock (sk );
1706
1700
1707
1701
spin_lock_bh (& mux -> lock );
@@ -1717,7 +1711,7 @@ static int kcm_release(struct socket *sock)
1717
1711
/* Cancel work. After this point there should be no outside references
1718
1712
* to the kcm socket.
1719
1713
*/
1720
- cancel_work_sync (& kcm -> tx_work );
1714
+ disable_work_sync (& kcm -> tx_work );
1721
1715
1722
1716
lock_sock (sk );
1723
1717
psock = kcm -> tx_psock ;
You can’t perform that action at this time.
0 commit comments