提交 d6817cdb 编写于 作者: J Joel Becker 提交者: Mark Fasheh

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: NJoel Becker <joel.becker@oracle.com>
Tested-by: NMarcos Matsunaga <marcos.matsunaga@oracle.com>
Signed-off-by: NMark Fasheh <mfasheh@suse.com>
上级 de6bf18e
...@@ -97,13 +97,14 @@ static int ocfs2_stack_driver_request(const char *stack_name, ...@@ -97,13 +97,14 @@ static int ocfs2_stack_driver_request(const char *stack_name,
goto out; goto out;
} }
/* Ok, the stack is pinned */
p->sp_count++;
active_stack = p; active_stack = p;
rc = 0; rc = 0;
out: out:
/* If we found it, pin it */
if (!rc)
active_stack->sp_count++;
spin_unlock(&ocfs2_stack_lock); spin_unlock(&ocfs2_stack_lock);
return rc; return rc;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册