md-cluster: remove inappropriate try_module_get from join()

md_setup_cluster already calls try_module_get(), so this
try_module_get isn't needed.
Also, there is no matching module_put (except in error patch),
so this leaves an unbalanced module count.

Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
NeilBrown 2015-08-14 10:22:00 +10:00
parent 6022e75bf0
commit 18b9f67962
1 changed files with 0 additions and 4 deletions

View File

@ -687,9 +687,6 @@ static int join(struct mddev *mddev, int nodes)
int ret, ops_rv; int ret, ops_rv;
char str[64]; char str[64];
if (!try_module_get(THIS_MODULE))
return -ENOENT;
cinfo = kzalloc(sizeof(struct md_cluster_info), GFP_KERNEL); cinfo = kzalloc(sizeof(struct md_cluster_info), GFP_KERNEL);
if (!cinfo) if (!cinfo)
return -ENOMEM; return -ENOMEM;
@ -771,7 +768,6 @@ err:
dlm_release_lockspace(cinfo->lockspace, 2); dlm_release_lockspace(cinfo->lockspace, 2);
mddev->cluster_info = NULL; mddev->cluster_info = NULL;
kfree(cinfo); kfree(cinfo);
module_put(THIS_MODULE);
return ret; return ret;
} }