Commit 2e8e9ac3 authored by Joel Becker's avatar Joel Becker Committed by Greg Kroah-Hartman

ocfs2: Increment the reference count of an already-active stack.

commit d6817cdb upstream

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: default avatarJoel Becker <joel.becker@oracle.com>
Tested-by: default avatarMarcos Matsunaga <marcos.matsunaga@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 90af668a
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment