diff options
-rw-r--r-- | fs/ocfs2/dlmglue.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 40562185088a..ebc4a49801bd 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -2640,22 +2640,22 @@ recheck: | |||
2640 | /* if we're blocking an exclusive and we have *any* holders, | 2640 | /* if we're blocking an exclusive and we have *any* holders, |
2641 | * then requeue. */ | 2641 | * then requeue. */ |
2642 | if ((lockres->l_blocking == LKM_EXMODE) | 2642 | if ((lockres->l_blocking == LKM_EXMODE) |
2643 | && (lockres->l_ex_holders || lockres->l_ro_holders)) { | 2643 | && (lockres->l_ex_holders || lockres->l_ro_holders)) |
2644 | spin_unlock_irqrestore(&lockres->l_lock, flags); | 2644 | goto leave_requeue; |
2645 | ctl->requeue = 1; | ||
2646 | ret = 0; | ||
2647 | goto leave; | ||
2648 | } | ||
2649 | 2645 | ||
2650 | /* If it's a PR we're blocking, then only | 2646 | /* If it's a PR we're blocking, then only |
2651 | * requeue if we've got any EX holders */ | 2647 | * requeue if we've got any EX holders */ |
2652 | if (lockres->l_blocking == LKM_PRMODE && | 2648 | if (lockres->l_blocking == LKM_PRMODE && |
2653 | lockres->l_ex_holders) { | 2649 | lockres->l_ex_holders) |
2654 | spin_unlock_irqrestore(&lockres->l_lock, flags); | 2650 | goto leave_requeue; |
2655 | ctl->requeue = 1; | 2651 | |
2656 | ret = 0; | 2652 | /* |
2657 | goto leave; | 2653 | * Can we get a lock in this state if the holder counts are |
2658 | } | 2654 | * zero? The meta data unblock code used to check this. |
2655 | */ | ||
2656 | if ((lockres->l_ops->flags & LOCK_TYPE_REQUIRES_REFRESH) | ||
2657 | && (lockres->l_flags & OCFS2_LOCK_REFRESHING)) | ||
2658 | goto leave_requeue; | ||
2659 | 2659 | ||
2660 | /* If we get here, then we know that there are no more | 2660 | /* If we get here, then we know that there are no more |
2661 | * incompatible holders (and anyone asking for an incompatible | 2661 | * incompatible holders (and anyone asking for an incompatible |
@@ -2692,6 +2692,13 @@ downconvert: | |||
2692 | leave: | 2692 | leave: |
2693 | mlog_exit(ret); | 2693 | mlog_exit(ret); |
2694 | return ret; | 2694 | return ret; |
2695 | |||
2696 | leave_requeue: | ||
2697 | spin_unlock_irqrestore(&lockres->l_lock, flags); | ||
2698 | ctl->requeue = 1; | ||
2699 | |||
2700 | mlog_exit(0); | ||
2701 | return 0; | ||
2695 | } | 2702 | } |
2696 | 2703 | ||
2697 | static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres, | 2704 | static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres, |