Commit 8d90041a authored by Alexander Aring's avatar Alexander Aring Committed by David Teigland
Browse files

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: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent a8abcff1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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