diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2020-09-23 11:36:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-23 22:07:54 +0300 |
commit | d6e6426f69b3225af8d992ec6bc66fb3fd4c4196 (patch) | |
tree | 5c38128786256f0af6317f53728b3f4e62f2089a /drivers/s390/net/qeth_l3_main.c | |
parent | 668e225126750c47635b56519b8bcc3aac35e937 (diff) | |
download | linux-d6e6426f69b3225af8d992ec6bc66fb3fd4c4196.tar.xz |
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 <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 903d7b6f511f..810d65fd48b4 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -536,7 +536,6 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card, QETH_CARD_TEXT(card, 2, "addipato"); - mutex_lock(&card->conf_mutex); mutex_lock(&card->ip_lock); list_for_each_entry(ipatoe, &card->ipato.entries, entry) { @@ -556,7 +555,6 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card, } mutex_unlock(&card->ip_lock); - mutex_unlock(&card->conf_mutex); return rc; } @@ -570,7 +568,6 @@ int qeth_l3_del_ipato_entry(struct qeth_card *card, QETH_CARD_TEXT(card, 2, "delipato"); - mutex_lock(&card->conf_mutex); mutex_lock(&card->ip_lock); list_for_each_entry_safe(ipatoe, tmp, &card->ipato.entries, entry) { @@ -587,7 +584,6 @@ int qeth_l3_del_ipato_entry(struct qeth_card *card, } mutex_unlock(&card->ip_lock); - mutex_unlock(&card->conf_mutex); return rc; } |