aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm/user.c')
-rw-r--r--fs/dlm/user.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 494d00ac014e..c37e93e4f2df 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -325,7 +325,7 @@ static int device_remove_lockspace(struct dlm_lspace_params *params)
325{ 325{
326 dlm_lockspace_t *lockspace; 326 dlm_lockspace_t *lockspace;
327 struct dlm_ls *ls; 327 struct dlm_ls *ls;
328 int error; 328 int error, force = 0;
329 329
330 if (!capable(CAP_SYS_ADMIN)) 330 if (!capable(CAP_SYS_ADMIN))
331 return -EPERM; 331 return -EPERM;
@@ -341,6 +341,9 @@ static int device_remove_lockspace(struct dlm_lspace_params *params)
341 } 341 }
342 kfree(ls->ls_device.name); 342 kfree(ls->ls_device.name);
343 343
344 if (params->flags & DLM_USER_LSFLG_FORCEFREE)
345 force = 2;
346
344 lockspace = ls->ls_local_handle; 347 lockspace = ls->ls_local_handle;
345 348
346 /* dlm_release_lockspace waits for references to go to zero, 349 /* dlm_release_lockspace waits for references to go to zero,
@@ -348,8 +351,8 @@ static int device_remove_lockspace(struct dlm_lspace_params *params)
348 before the release will procede */ 351 before the release will procede */
349 352
350 dlm_put_lockspace(ls); 353 dlm_put_lockspace(ls);
351 error = dlm_release_lockspace(lockspace, 0); 354 error = dlm_release_lockspace(lockspace, force);
352out: 355 out:
353 return error; 356 return error;
354} 357}
355 358