Messages in this thread Patch in this message | | | Date | Mon, 6 Oct 2008 17:38:31 -0700 | From | Greg KH <> | Subject | [patch 25/71] ocfs2: Increment the reference count of an already-active stack. |
| |
2.6.26-stable review patch. If anyone has any objections, please let us know.
------------------ From: Joel Becker <Joel.Becker@oracle.com>
commit d6817cdbd143f87f9d7c59a4c3194091190eeb84 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: Joel Becker <joel.becker@oracle.com> Tested-by: Marcos Matsunaga <marcos.matsunaga@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- fs/ocfs2/stackglue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
--- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c @@ -97,13 +97,14 @@ static int ocfs2_stack_driver_request(co 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; } --
| |