@@ -1173,29 +1173,29 @@ static void dlm_init_migratable_lockres(
mres->master = master;
}
-static void dlm_prepare_lvb_for_migration(struct dlm_lock *lock,
+static int dlm_prepare_lvb_for_migration(struct dlm_lock *lock,
struct dlm_migratable_lockres *mres,
int queue)
{
if (!lock->lksb)
- return;
+ return 0;
/* Ignore lvb in all locks in the blocked list */
if (queue == DLM_BLOCKED_LIST)
- return;
+ return 0;
/* Only consider lvbs in locks with granted EX or PR lock levels */
if (lock->ml.type != LKM_EXMODE && lock->ml.type != LKM_PRMODE)
- return;
+ return 0;
if (dlm_lvb_is_empty(mres->lvb)) {
memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN);
- return;
+ return 0;
}
/* Ensure the lvb copied for migration matches in other valid locks */
if (!memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))
- return;
+ return 0;
mlog(ML_ERROR, "Mismatched lvb in lock cookie=%u:%llu, name=%.*s, "
"node=%u\n",
@@ -1204,7 +1204,9 @@ static void dlm_prepare_lvb_for_migratio
lock->lockres->lockname.len, lock->lockres->lockname.name,
lock->ml.node);
dlm_print_one_lock_resource(lock->lockres);
- BUG();
+ /* BUG();*/
+
+ return 1;
}