]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.fixes/ocfs2-dlm-wait-on-lockres-instead-of-err-during-cancel.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / ocfs2-dlm-wait-on-lockres-instead-of-err-during-cancel.patch
1 From: Goldwyn Rodrigues <rgoldwyn@novell.com>
2 Subject: ocfs2/dlm Wait on lockres instead of erroring during cancel
3 References: bnc#524683
4 Patch-mainline: queued
5
6 If the DLM lock is in progress and someone issues a cancel, let the lock wait.
7 Added conditions for the process to fall through in case flag is set to
8 LKM_CANCEL.
9
10 Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.de>
11 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12
13 ---
14 ocfs2/dlm/dlmunlock.c | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17 Index: fs/ocfs2/dlm/dlmunlock.c
18 ===================================================================
19 --- a/fs/ocfs2/dlm/dlmunlock.c 2009-07-30 16:02:55.000000000 +0200
20 +++ b/fs/ocfs2/dlm/dlmunlock.c 2009-08-21 18:04:03.000000000 +0200
21 @@ -122,7 +122,7 @@ static enum dlm_status dlmunlock_common(
22 * that still has AST's pending... */
23 in_use = !list_empty(&lock->ast_list);
24 spin_unlock(&dlm->ast_lock);
25 - if (in_use) {
26 + if (in_use && !(flags & LKM_CANCEL)) {
27 mlog(ML_ERROR, "lockres %.*s: Someone is calling dlmunlock "
28 "while waiting for an ast!", res->lockname.len,
29 res->lockname.name);
30 @@ -131,7 +131,7 @@ static enum dlm_status dlmunlock_common(
31
32 spin_lock(&res->spinlock);
33 if (res->state & DLM_LOCK_RES_IN_PROGRESS) {
34 - if (master_node) {
35 + if (master_node && !(flags & LKM_CANCEL)) {
36 mlog(ML_ERROR, "lockres in progress!\n");
37 spin_unlock(&res->spinlock);
38 return DLM_FORWARD;