From: Joel Becker Date: Fri, 22 Aug 2008 21:30:10 +0000 (-0700) Subject: ocfs2: Increment the reference count of an already-active stack. X-Git-Tag: MMI-PSA29.97-13-9~32133^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d6817cdbd143f87f9d7c59a4c3194091190eeb84;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ocfs2: Increment the reference count of an already-active stack. The ocfs2_stack_driver_request() function failed to increment the refcount of an already-active stack. It only did the increment on the first reference. Whoops. Signed-off-by: Joel Becker Tested-by: Marcos Matsunaga Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index 10e149ae5e3a..07f348b8d721 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c @@ -97,13 +97,14 @@ static int ocfs2_stack_driver_request(const char *stack_name, goto out; } - /* Ok, the stack is pinned */ - p->sp_count++; active_stack = p; - rc = 0; out: + /* If we found it, pin it */ + if (!rc) + active_stack->sp_count++; + spin_unlock(&ocfs2_stack_lock); return rc; }