Commit 18b9f679 authored by NeilBrown's avatar NeilBrown

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: default avatarNeilBrown <neilb@suse.com>
parent 6022e75b
......@@ -687,9 +687,6 @@ static int join(struct mddev *mddev, int nodes)
int ret, ops_rv;
char str[64];
if (!try_module_get(THIS_MODULE))
return -ENOENT;
cinfo = kzalloc(sizeof(struct md_cluster_info), GFP_KERNEL);
if (!cinfo)
return -ENOMEM;
......@@ -771,7 +768,6 @@ static int join(struct mddev *mddev, int nodes)
dlm_release_lockspace(cinfo->lockspace, 2);
mddev->cluster_info = NULL;
kfree(cinfo);
module_put(THIS_MODULE);
return ret;
}
......
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