Since flags is only set as LKF_NOQUEUE, the code
with LKF_CONVERT flag should be delete.
Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
#include <errno.h>
#else
#define LKF_NOQUEUE 0x00000001
#include <errno.h>
#else
#define LKF_NOQUEUE 0x00000001
-#define LKF_CONVERT 0x00000004
#define LKM_PWMODE 4
#define EUNLOCK 0x10002
#define LKM_PWMODE 4
#define EUNLOCK 0x10002
- /* Conversions need the lockid in the LKSB */
- if (flags & LKF_CONVERT)
- dlm_lock_res->lksb.sb_lkid = *lockid;
-
snprintf(str, 64, "bitmap%s", cluster_name);
snprintf(str, 64, "bitmap%s", cluster_name);
- /* if flags with LKF_CONVERT causes below return ENOENT which means
- * "No such file or directory" */
ret = dlm_hooks->ls_lock(dlm_lock_res->ls, LKM_PWMODE, &dlm_lock_res->lksb,
flags, str, strlen(str), 0, dlm_ast,
dlm_lock_res, NULL, NULL);
ret = dlm_hooks->ls_lock(dlm_lock_res->ls, LKM_PWMODE, &dlm_lock_res->lksb,
flags, str, strlen(str), 0, dlm_ast,
dlm_lock_res, NULL, NULL);
if (!cluster_name)
return -1;
if (!cluster_name)
return -1;
- /* if flags with LKF_CONVERT causes below return EINVAL which means
- * "Invalid argument" */
ret = dlm_hooks->ls_unlock(dlm_lock_res->ls, lockid, 0,
&dlm_lock_res->lksb, dlm_lock_res);
if (ret) {
ret = dlm_hooks->ls_unlock(dlm_lock_res->ls, lockid, 0,
&dlm_lock_res->lksb, dlm_lock_res);
if (ret) {