Skip to content

Commit

Permalink
ocfs2: Fix setting of OCFS2_LOCK_BLOCKED during bast
Browse files Browse the repository at this point in the history
During bast, set the OCFS2_LOCK_BLOCKED flag only if the lock needs to
downconverted.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Acked-by: Sunil Mushran <sunil.mushran@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
  • Loading branch information
Wengang Wang authored and Joel Becker committed Feb 3, 2010
1 parent 34e6c59 commit 0b94a90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/ocfs2/dlmglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,6 @@ static int ocfs2_generic_handle_bast(struct ocfs2_lock_res *lockres,

assert_spin_locked(&lockres->l_lock);

lockres_or_flags(lockres, OCFS2_LOCK_BLOCKED);

if (level > lockres->l_blocking) {
/* only schedule a downconvert if we haven't already scheduled
* one that goes low enough to satisfy the level we're
Expand All @@ -921,6 +919,9 @@ static int ocfs2_generic_handle_bast(struct ocfs2_lock_res *lockres,
lockres->l_blocking = level;
}

if (needs_downconvert)
lockres_or_flags(lockres, OCFS2_LOCK_BLOCKED);

mlog_exit(needs_downconvert);
return needs_downconvert;
}
Expand Down

0 comments on commit 0b94a90

Please sign in to comment.