diff options
author | David Teigland <teigland@redhat.com> | 2006-08-30 17:50:18 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-08-31 18:15:37 +0200 |
commit | c6e6f0ba8fc1dea99c7bd020916f24d533b62697 (patch) | |
tree | a27f0c7695e22fe83123448428bf77d32a5aa6ee /fs/dlm/user.c | |
parent | [GFS2] Fix releasepage bug (fixes direct i/o writes) (diff) | |
download | linux-c6e6f0ba8fc1dea99c7bd020916f24d533b62697.tar.xz linux-c6e6f0ba8fc1dea99c7bd020916f24d533b62697.zip |
[DLM] force removal of user lockspace
Check if the FORCEFREE flag has been provided from user space. If so, set
the force option to dlm_release_lockspace() so that any remaining locks
will be freed.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/dlm/user.c | 9 |
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) { 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; } |