mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
dlm: handle release_option as unsigned
Future patches will introduce a invalid argument check for undefined values. All values for release_option are positive integer values to not check on negative values as well we just change the parameter to unsigned int. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
committed by
David Teigland
parent
a8abcff174
commit
8d90041a0d
+4
-4
@@ -676,7 +676,7 @@ int dlm_new_user_lockspace(const char *name, const char *cluster,
|
||||
This is because there may be LKBs queued as ASTs that have been unlinked
|
||||
from their RSBs and are pending deletion once the AST has been delivered */
|
||||
|
||||
static int lockspace_busy(struct dlm_ls *ls, int release_option)
|
||||
static int lockspace_busy(struct dlm_ls *ls, unsigned int release_option)
|
||||
{
|
||||
struct dlm_lkb *lkb;
|
||||
unsigned long id;
|
||||
@@ -704,7 +704,7 @@ static int lockspace_busy(struct dlm_ls *ls, int release_option)
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int release_lockspace(struct dlm_ls *ls, int release_option)
|
||||
static int release_lockspace(struct dlm_ls *ls, unsigned int release_option)
|
||||
{
|
||||
int busy, rv;
|
||||
|
||||
@@ -792,7 +792,7 @@ static int release_lockspace(struct dlm_ls *ls, int release_option)
|
||||
* See DLM_RELEASE defines for release_option values and their meaning.
|
||||
*/
|
||||
|
||||
int dlm_release_lockspace(void *lockspace, int force)
|
||||
int dlm_release_lockspace(void *lockspace, unsigned int release_option)
|
||||
{
|
||||
struct dlm_ls *ls;
|
||||
int error;
|
||||
@@ -803,7 +803,7 @@ int dlm_release_lockspace(void *lockspace, int force)
|
||||
dlm_put_lockspace(ls);
|
||||
|
||||
mutex_lock(&ls_lock);
|
||||
error = release_lockspace(ls, force);
|
||||
error = release_lockspace(ls, release_option);
|
||||
if (!error)
|
||||
ls_count--;
|
||||
if (!ls_count)
|
||||
|
||||
+2
-1
@@ -122,7 +122,8 @@ int dlm_new_lockspace(const char *name, const char *cluster,
|
||||
* release_option: see DLM_RELEASE values above.
|
||||
*/
|
||||
|
||||
int dlm_release_lockspace(dlm_lockspace_t *lockspace, int release_option);
|
||||
int dlm_release_lockspace(dlm_lockspace_t *lockspace,
|
||||
unsigned int release_option);
|
||||
|
||||
/*
|
||||
* dlm_lock
|
||||
|
||||
Reference in New Issue
Block a user