]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/dlm-fix-use-count-with-multiple-joins.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / dlm-fix-use-count-with-multiple-joins.patch
CommitLineData
2cb7cef9
BS
1From 8511a2728ab82cab398e39d019f5cf1246021c1c Mon Sep 17 00:00:00 2001
2From: David Teigland <teigland@redhat.com>
3Date: Wed, 8 Apr 2009 15:38:43 -0500
4Subject: [PATCH] dlm: fix use count with multiple joins
5
6When a lockspace was joined multiple times, the global dlm
7use count was incremented when it should not have been. This
8caused the global dlm threads to not be stopped when all
9lockspaces were eventually be removed.
10
11Signed-off-by: David Teigland <teigland@redhat.com>
12Signed-off-by: Coly Li <coly.li@suse.de>
13---
14 fs/dlm/lockspace.c | 13 ++++++-------
15 1 files changed, 6 insertions(+), 7 deletions(-)
16
17diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
18index 82528d9..d489fcc 100644
19--- a/fs/dlm/lockspace.c
20+++ b/fs/dlm/lockspace.c
21@@ -419,16 +419,14 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
22 break;
23 }
24 ls->ls_create_count++;
25- module_put(THIS_MODULE);
26- error = 1; /* not an error, return 0 */
27+ *lockspace = ls;
28+ error = 1;
29 break;
30 }
31 spin_unlock(&lslist_lock);
32
33- if (error < 0)
34- goto out;
35 if (error)
36- goto ret_zero;
37+ goto out;
38
39 error = -ENOMEM;
40
41@@ -583,7 +581,6 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
42 dlm_create_debug_file(ls);
43
44 log_debug(ls, "join complete");
45- ret_zero:
46 *lockspace = ls;
47 return 0;
48
49@@ -628,7 +625,9 @@ int dlm_new_lockspace(const char *name, int namelen, void **lockspace,
50 error = new_lockspace(name, namelen, lockspace, flags, lvblen);
51 if (!error)
52 ls_count++;
53- else if (!ls_count)
54+ if (error > 0)
55+ error = 0;
56+ if (!ls_count)
57 threads_stop();
58 out:
59 mutex_unlock(&ls_lock);
60--
611.6.0.2
62