Skip to content

Commit 18b9f67

Browse files
author
NeilBrown
committed
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>
1 parent 6022e75 commit 18b9f67

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/md/md-cluster.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,6 @@ static int join(struct mddev *mddev, int nodes)
687687
int ret, ops_rv;
688688
char str[64];
689689

690-
if (!try_module_get(THIS_MODULE))
691-
return -ENOENT;
692-
693690
cinfo = kzalloc(sizeof(struct md_cluster_info), GFP_KERNEL);
694691
if (!cinfo)
695692
return -ENOMEM;
@@ -771,7 +768,6 @@ static int join(struct mddev *mddev, int nodes)
771768
dlm_release_lockspace(cinfo->lockspace, 2);
772769
mddev->cluster_info = NULL;
773770
kfree(cinfo);
774-
module_put(THIS_MODULE);
775771
return ret;
776772
}
777773

0 commit comments

Comments
 (0)