aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/dlm/lock.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 30878defaeb6..69ada5887078 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -3571,6 +3571,14 @@ int dlm_recover_process_copy(struct dlm_ls *ls, struct dlm_rcom *rc)
3571 lock_rsb(r); 3571 lock_rsb(r);
3572 3572
3573 switch (error) { 3573 switch (error) {
3574 case -EBADR:
3575 /* There's a chance the new master received our lock before
3576 dlm_recover_master_reply(), this wouldn't happen if we did
3577 a barrier between recover_masters and recover_locks. */
3578 log_debug(ls, "master copy not ready %x r %lx %s", lkb->lkb_id,
3579 (unsigned long)r, r->res_name);
3580 dlm_send_rcom_lock(r, lkb);
3581 goto out;
3574 case -EEXIST: 3582 case -EEXIST:
3575 log_debug(ls, "master copy exists %x", lkb->lkb_id); 3583 log_debug(ls, "master copy exists %x", lkb->lkb_id);
3576 /* fall through */ 3584 /* fall through */
@@ -3585,7 +3593,7 @@ int dlm_recover_process_copy(struct dlm_ls *ls, struct dlm_rcom *rc)
3585 /* an ack for dlm_recover_locks() which waits for replies from 3593 /* an ack for dlm_recover_locks() which waits for replies from
3586 all the locks it sends to new masters */ 3594 all the locks it sends to new masters */
3587 dlm_recovered_lock(r); 3595 dlm_recovered_lock(r);
3588 3596 out:
3589 unlock_rsb(r); 3597 unlock_rsb(r);
3590 put_rsb(r); 3598 put_rsb(r);
3591 dlm_put_lkb(lkb); 3599 dlm_put_lkb(lkb);