Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30691
b: refs/heads/master
c: 2abaf97
h: refs/heads/master
i:
  30689: 8b8379d
  30687: 5b5eb00
v: v3
  • Loading branch information
Kurt Hackel authored and Mark Fasheh committed Jun 26, 2006
1 parent a8d1bd7 commit 36ea195
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: aa087b84977173395c0e3a1e0c1773314958f277
refs/heads/master: 2abaf97e62e51fdd09d5a46703b3b680f24bdd8b
8 changes: 7 additions & 1 deletion trunk/fs/ocfs2/dlm/dlmlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,
struct dlm_lock *lock, int flags)
{
enum dlm_status status = DLM_DENIED;
int lockres_changed = 1;

mlog_entry("type=%d\n", lock->ml.type);
mlog(0, "lockres %.*s, flags = 0x%x\n", res->lockname.len,
Expand Down Expand Up @@ -230,6 +231,10 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,
dlm_error(status);
dlm_revert_pending_lock(res, lock);
dlm_lock_put(lock);
/* do NOT call calc_usage, as this would unhash the remote
* lockres before we ever get to use it. treat as if we
* never made any change to the lockres. */
lockres_changed = 0;
} else if (dlm_is_recovery_lock(res->lockname.name,
res->lockname.len)) {
/* special case for the $RECOVERY lock.
Expand All @@ -243,7 +248,8 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,
}
spin_unlock(&res->spinlock);

dlm_lockres_calc_usage(dlm, res);
if (lockres_changed)
dlm_lockres_calc_usage(dlm, res);

wake_up(&res->wq);
return status;
Expand Down

0 comments on commit 36ea195

Please sign in to comment.