aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/lockspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm/lockspace.c')
-rw-r--r--fs/dlm/lockspace.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 499ee1156365..f8842ca443c2 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -43,6 +43,10 @@ static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len)
43 ssize_t ret = len; 43 ssize_t ret = len;
44 int n = simple_strtol(buf, NULL, 0); 44 int n = simple_strtol(buf, NULL, 0);
45 45
46 ls = dlm_find_lockspace_local(ls->ls_local_handle);
47 if (!ls)
48 return -EINVAL;
49
46 switch (n) { 50 switch (n) {
47 case 0: 51 case 0:
48 dlm_ls_stop(ls); 52 dlm_ls_stop(ls);
@@ -53,6 +57,7 @@ static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len)
53 default: 57 default:
54 ret = -EINVAL; 58 ret = -EINVAL;
55 } 59 }
60 dlm_put_lockspace(ls);
56 return ret; 61 return ret;
57} 62}
58 63