Skip to content

Commit

Permalink
ocfs2: Increment the reference count of an already-active stack.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joel Becker authored and Mark Fasheh committed Aug 25, 2008
1 parent de6bf18 commit d6817cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/ocfs2/stackglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d6817cd

Please sign in to comment.