diff mbox series

[33/40] lustre: ldlm: remove client_import_find_conn()

Message ID 1681042400-15491-34-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: backport OpenSFS changes from March XX, 2023 | expand

Commit Message

James Simmons April 9, 2023, 12:13 p.m. UTC
From: Mr NeilBrown <neilb@suse.de>

This function hasn't been used since
Commit 3dd3fe462023 ("lustre: mgc: Use IR for client->MDS/OST connections").
So remove it.

WC-bug-id: https://jira.whamcloud.com/browse/LU-10360
Lustre-commit: 14544bdca5cc42a3e ("LU-10360 ldlm: remove client_import_find_conn()")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50000
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/include/lustre_net.h |  2 --
 fs/lustre/ldlm/ldlm_lib.c      | 24 ------------------------
 2 files changed, 26 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/include/lustre_net.h b/fs/lustre/include/lustre_net.h
index 1ffe9f7..a305ba3 100644
--- a/fs/lustre/include/lustre_net.h
+++ b/fs/lustre/include/lustre_net.h
@@ -2358,8 +2358,6 @@  int client_import_dyn_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
 int client_import_add_nids_to_conn(struct obd_import *imp, lnet_nid_t *nids,
 				   int nid_count, struct obd_uuid *uuid);
 int client_import_del_conn(struct obd_import *imp, struct obd_uuid *uuid);
-int client_import_find_conn(struct obd_import *imp, lnet_nid_t peer,
-			    struct obd_uuid *uuid);
 int import_set_conn_priority(struct obd_import *imp, struct obd_uuid *uuid);
 void client_destroy_import(struct obd_import *imp);
 /** @} */
diff --git a/fs/lustre/ldlm/ldlm_lib.c b/fs/lustre/ldlm/ldlm_lib.c
index 0b8389e..b1ce0d4 100644
--- a/fs/lustre/ldlm/ldlm_lib.c
+++ b/fs/lustre/ldlm/ldlm_lib.c
@@ -243,30 +243,6 @@  int client_import_del_conn(struct obd_import *imp, struct obd_uuid *uuid)
 }
 EXPORT_SYMBOL(client_import_del_conn);
 
-/**
- * Find conn UUID by peer NID. @peer is a server NID. This function is used
- * to find a conn uuid of @imp which can reach @peer.
- */
-int client_import_find_conn(struct obd_import *imp, lnet_nid_t peer,
-			    struct obd_uuid *uuid)
-{
-	struct obd_import_conn *conn;
-	int rc = -ENOENT;
-
-	spin_lock(&imp->imp_lock);
-	list_for_each_entry(conn, &imp->imp_conn_list, oic_item) {
-		/* Check if conn UUID does have this peer NID. */
-		if (class_check_uuid(&conn->oic_uuid, peer)) {
-			*uuid = conn->oic_uuid;
-			rc = 0;
-			break;
-		}
-	}
-	spin_unlock(&imp->imp_lock);
-	return rc;
-}
-EXPORT_SYMBOL(client_import_find_conn);
-
 void client_destroy_import(struct obd_import *imp)
 {
 	/*