Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35500
b: refs/heads/master
c: f7fbfdd
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh committed Sep 24, 2006
1 parent 01cf8fd commit 67d55cf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b80fc012e03f8f207911b5eafe6916b000e03c8b
refs/heads/master: f7fbfdd1fc91543253ba742a926a29c289f8e6ca
31 changes: 19 additions & 12 deletions trunk/fs/ocfs2/dlmglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2640,22 +2640,22 @@ static int ocfs2_generic_unblock_lock(struct ocfs2_super *osb,
/* if we're blocking an exclusive and we have *any* holders,
* then requeue. */
if ((lockres->l_blocking == LKM_EXMODE)
&& (lockres->l_ex_holders || lockres->l_ro_holders)) {
spin_unlock_irqrestore(&lockres->l_lock, flags);
ctl->requeue = 1;
ret = 0;
goto leave;
}
&& (lockres->l_ex_holders || lockres->l_ro_holders))
goto leave_requeue;

/* If it's a PR we're blocking, then only
* requeue if we've got any EX holders */
if (lockres->l_blocking == LKM_PRMODE &&
lockres->l_ex_holders) {
spin_unlock_irqrestore(&lockres->l_lock, flags);
ctl->requeue = 1;
ret = 0;
goto leave;
}
lockres->l_ex_holders)
goto leave_requeue;

/*
* Can we get a lock in this state if the holder counts are
* zero? The meta data unblock code used to check this.
*/
if ((lockres->l_ops->flags & LOCK_TYPE_REQUIRES_REFRESH)
&& (lockres->l_flags & OCFS2_LOCK_REFRESHING))
goto leave_requeue;

/* If we get here, then we know that there are no more
* incompatible holders (and anyone asking for an incompatible
Expand Down Expand Up @@ -2692,6 +2692,13 @@ static int ocfs2_generic_unblock_lock(struct ocfs2_super *osb,
leave:
mlog_exit(ret);
return ret;

leave_requeue:
spin_unlock_irqrestore(&lockres->l_lock, flags);
ctl->requeue = 1;

mlog_exit(0);
return 0;
}

static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
Expand Down

0 comments on commit 67d55cf

Please sign in to comment.