[lustre-devel] [PATCH 024/151] lnet: Fix lost lock

James Simmons jsimmons at infradead.org
Mon Sep 30 11:54:43 PDT 2019


From: Dmitry Eremin <dmitry.eremin at intel.com>

Unlock lnet_net_lock in case of error in function lnet_dyn_del_net().

WC-bug-id: https://jira.whamcloud.com/browse/LU-9769
Lustre-commit: 9761b5c63103 ("LU-9769 lnet: Fix lost lock")
Signed-off-by: Dmitry Eremin <dmitry.eremin at intel.com>
Reviewed-on: https://review.whamcloud.com/28039
Reviewed-by: Amir Shehata <ashehata at whamcloud.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: James Simmons <uja.ornl at yahoo.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 net/lnet/lnet/api-ni.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/lnet/lnet/api-ni.c b/net/lnet/lnet/api-ni.c
index c33cd1f..47f4f2a 100644
--- a/net/lnet/lnet/api-ni.c
+++ b/net/lnet/lnet/api-ni.c
@@ -2906,6 +2906,7 @@ int lnet_dyn_del_ni(struct lnet_ioctl_config_ni *conf)
 
 	net = lnet_get_net_locked(net_id);
 	if (!net) {
+		lnet_net_unlock(0);
 		rc = -EINVAL;
 		goto out;
 	}
-- 
1.8.3.1



More information about the lustre-devel mailing list