lkml.org 
[lkml]   [2008]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    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;
    }
    --


    \
     
     \ /
      Last update: 2008-10-07 02:53    [W:4.074 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site