]> err.no Git - linux-2.6/blobdiff - fs/dlm/user.c
[PATCH] nfsd: change uses of f_{dentry, vfsmnt} to use f_path
[linux-2.6] / fs / dlm / user.c
index fd19caf9af973b888750b0ca0dc7080c232974ab..c37e93e4f2df6f8625ee31064f857469bb544290 100644 (file)
@@ -175,7 +175,7 @@ void dlm_user_add_ast(struct dlm_lkb *lkb, int type)
        /* noqueue requests that fail may need to be removed from the
           proc's locks list, there should be a better way of detecting
           this situation than checking all these things... */
-          
+
        if (type == AST_COMP && lkb->lkb_grmode == DLM_LOCK_IV &&
            ua->lksb.sb_status == -EAGAIN && !list_empty(&lkb->lkb_ownqueue))
                remove_ownqueue = 1;
@@ -325,7 +325,7 @@ static int device_remove_lockspace(struct dlm_lspace_params *params)
 {
        dlm_lockspace_t *lockspace;
        struct dlm_ls *ls;
-       int error;
+       int error, force = 0;
 
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
@@ -341,6 +341,9 @@ static int device_remove_lockspace(struct dlm_lspace_params *params)
        }
        kfree(ls->ls_device.name);
 
+       if (params->flags & DLM_USER_LSFLG_FORCEFREE)
+               force = 2;
+
        lockspace = ls->ls_local_handle;
 
        /* dlm_release_lockspace waits for references to go to zero,
@@ -348,8 +351,8 @@ static int device_remove_lockspace(struct dlm_lspace_params *params)
           before the release will procede */
 
        dlm_put_lockspace(ls);
-       error = dlm_release_lockspace(lockspace, 0);
-out:
+       error = dlm_release_lockspace(lockspace, force);
+ out:
        return error;
 }