From d6e6426f69b3225af8d992ec6bc66fb3fd4c4196 Mon Sep 17 00:00:00 2001 From: Julian Wiedmann Date: Wed, 23 Sep 2020 10:36:53 +0200 Subject: s390/qeth: relax locking for ipato config data card->ipato is currently protected by the conf_mutex. But most users also hold the ip_lock - in particular qeth_l3_add_ip(). So slightly expand the sections under ip_lock in a few places (to effectively cover a few error & no-op cases), and then drop the conf_mutex where it's no longer needed. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller --- drivers/s390/net/qeth_core.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/s390/net/qeth_core.h') diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 2c14012ca35d..1b3fe384dcc9 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -814,12 +814,16 @@ struct qeth_card { struct workqueue_struct *event_wq; struct workqueue_struct *cmd_wq; wait_queue_head_t wait_q; + + struct mutex ip_lock; + /* protected by ip_lock: */ DECLARE_HASHTABLE(ip_htable, 4); + struct qeth_ipato ipato; + DECLARE_HASHTABLE(local_addrs4, 4); DECLARE_HASHTABLE(local_addrs6, 4); spinlock_t local_addrs4_lock; spinlock_t local_addrs6_lock; - struct mutex ip_lock; DECLARE_HASHTABLE(rx_mode_addrs, 4); struct work_struct rx_mode_work; struct work_struct kernel_thread_starter; @@ -827,7 +831,6 @@ struct qeth_card { unsigned long thread_start_mask; unsigned long thread_allowed_mask; unsigned long thread_running_mask; - struct qeth_ipato ipato; struct list_head cmd_waiter_list; /* QDIO buffer handling */ struct qeth_qdio_info qdio; -- cgit