aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmrecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/dlm/dlmrecovery.c')
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index b568bb6617d8..8a3f0173ff56 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1021,8 +1021,9 @@ static int dlm_add_lock_to_array(struct dlm_lock *lock,
1021 ml->type == LKM_PRMODE) { 1021 ml->type == LKM_PRMODE) {
1022 /* if it is already set, this had better be a PR 1022 /* if it is already set, this had better be a PR
1023 * and it has to match */ 1023 * and it has to match */
1024 if (mres->lvb[0] && (ml->type == LKM_EXMODE || 1024 if (!dlm_lvb_is_empty(mres->lvb) &&
1025 memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) { 1025 (ml->type == LKM_EXMODE ||
1026 memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) {
1026 mlog(ML_ERROR, "mismatched lvbs!\n"); 1027 mlog(ML_ERROR, "mismatched lvbs!\n");
1027 __dlm_print_one_lock_resource(lock->lockres); 1028 __dlm_print_one_lock_resource(lock->lockres);
1028 BUG(); 1029 BUG();
@@ -1554,7 +1555,7 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
1554 lksb->flags |= (ml->flags & 1555 lksb->flags |= (ml->flags &
1555 (DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB)); 1556 (DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB));
1556 1557
1557 if (mres->lvb[0]) { 1558 if (!dlm_lvb_is_empty(mres->lvb)) {
1558 if (lksb->flags & DLM_LKSB_PUT_LVB) { 1559 if (lksb->flags & DLM_LKSB_PUT_LVB) {
1559 /* other node was trying to update 1560 /* other node was trying to update
1560 * lvb when node died. recreate the 1561 * lvb when node died. recreate the
@@ -1565,8 +1566,9 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
1565 * most recent valid lvb info */ 1566 * most recent valid lvb info */
1566 BUG_ON(ml->type != LKM_EXMODE && 1567 BUG_ON(ml->type != LKM_EXMODE &&
1567 ml->type != LKM_PRMODE); 1568 ml->type != LKM_PRMODE);
1568 if (res->lvb[0] && (ml->type == LKM_EXMODE || 1569 if (!dlm_lvb_is_empty(res->lvb) &&
1569 memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) { 1570 (ml->type == LKM_EXMODE ||
1571 memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) {
1570 mlog(ML_ERROR, "received bad lvb!\n"); 1572 mlog(ML_ERROR, "received bad lvb!\n");
1571 __dlm_print_one_lock_resource(res); 1573 __dlm_print_one_lock_resource(res);
1572 BUG(); 1574 BUG();