1 From 8511a2728ab82cab398e39d019f5cf1246021c1c Mon Sep 17 00:00:00 2001
2 From: David Teigland <teigland@redhat.com>
3 Date: Wed, 8 Apr 2009 15:38:43 -0500
4 Subject: [PATCH] dlm: fix use count with multiple joins
6 When a lockspace was joined multiple times, the global dlm
7 use count was incremented when it should not have been. This
8 caused the global dlm threads to not be stopped when all
9 lockspaces were eventually be removed.
11 Signed-off-by: David Teigland <teigland@redhat.com>
12 Signed-off-by: Coly Li <coly.li@suse.de>
14 fs/dlm/lockspace.c | 13 ++++++-------
15 1 files changed, 6 insertions(+), 7 deletions(-)
17 diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
18 index 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,
24 ls->ls_create_count++;
25 - module_put(THIS_MODULE);
26 - error = 1; /* not an error, return 0 */
31 spin_unlock(&lslist_lock);
41 @@ -583,7 +581,6 @@ static int new_lockspace(const char *name, int namelen, void **lockspace,
42 dlm_create_debug_file(ls);
44 log_debug(ls, "join complete");
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);
59 mutex_unlock(&ls_lock);