summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorWengang Wang <wen.gang.wang@oracle.com>2010-01-21 19:50:02 +0100
committerJoel Becker <joel.becker@oracle.com>2010-02-03 08:50:55 +0100
commit0b94a909eb2e2f6990d05fd486a0cb4902ef1ae7 (patch)
tree197c4da141781f52f72fe4f28e0e82e9432500b1 /fs
parentocfs2: Use compat_ptr in reflink_arguments. (diff)
downloadlinux-0b94a909eb2e2f6990d05fd486a0cb4902ef1ae7.tar.xz
linux-0b94a909eb2e2f6990d05fd486a0cb4902ef1ae7.zip
ocfs2: Fix setting of OCFS2_LOCK_BLOCKED during bast
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/dlmglue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 172f4c6ce1be..0cdf63042b76 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -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
@@ -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;
}