Commit b2b9bfff authored by Guoqing Jiang's avatar Guoqing Jiang Committed by NeilBrown

md-cluster: remove the unused sb_lock

The sb_lock is not used anywhere, so let's remove it.
Reviewed-by: default avatarGoldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: default avatarGuoqing Jiang <gqjiang@suse.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.com>
parent 9e3072e3
...@@ -52,7 +52,6 @@ struct md_cluster_info { ...@@ -52,7 +52,6 @@ struct md_cluster_info {
dlm_lockspace_t *lockspace; dlm_lockspace_t *lockspace;
int slot_number; int slot_number;
struct completion completion; struct completion completion;
struct dlm_lock_resource *sb_lock;
struct mutex sb_mutex; struct mutex sb_mutex;
struct dlm_lock_resource *bitmap_lockres; struct dlm_lock_resource *bitmap_lockres;
struct list_head suspend_list; struct list_head suspend_list;
...@@ -692,12 +691,6 @@ static int join(struct mddev *mddev, int nodes) ...@@ -692,12 +691,6 @@ static int join(struct mddev *mddev, int nodes)
ret = -ERANGE; ret = -ERANGE;
goto err; goto err;
} }
cinfo->sb_lock = lockres_init(mddev, "cmd-super",
NULL, 0);
if (!cinfo->sb_lock) {
ret = -ENOMEM;
goto err;
}
/* Initiate the communication resources */ /* Initiate the communication resources */
ret = -ENOMEM; ret = -ENOMEM;
cinfo->recv_thread = md_register_thread(recv_daemon, mddev, "cluster_recv"); cinfo->recv_thread = md_register_thread(recv_daemon, mddev, "cluster_recv");
...@@ -749,7 +742,6 @@ static int join(struct mddev *mddev, int nodes) ...@@ -749,7 +742,6 @@ static int join(struct mddev *mddev, int nodes)
lockres_free(cinfo->ack_lockres); lockres_free(cinfo->ack_lockres);
lockres_free(cinfo->no_new_dev_lockres); lockres_free(cinfo->no_new_dev_lockres);
lockres_free(cinfo->bitmap_lockres); lockres_free(cinfo->bitmap_lockres);
lockres_free(cinfo->sb_lock);
if (cinfo->lockspace) if (cinfo->lockspace)
dlm_release_lockspace(cinfo->lockspace, 2); dlm_release_lockspace(cinfo->lockspace, 2);
mddev->cluster_info = NULL; mddev->cluster_info = NULL;
...@@ -770,7 +762,6 @@ static int leave(struct mddev *mddev) ...@@ -770,7 +762,6 @@ static int leave(struct mddev *mddev)
lockres_free(cinfo->token_lockres); lockres_free(cinfo->token_lockres);
lockres_free(cinfo->ack_lockres); lockres_free(cinfo->ack_lockres);
lockres_free(cinfo->no_new_dev_lockres); lockres_free(cinfo->no_new_dev_lockres);
lockres_free(cinfo->sb_lock);
lockres_free(cinfo->bitmap_lockres); lockres_free(cinfo->bitmap_lockres);
dlm_release_lockspace(cinfo->lockspace, 2); dlm_release_lockspace(cinfo->lockspace, 2);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment