[lkml]   [2010]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 106/123] sunrpc: remove unnecessary svc_xprt_put
    2.6.33-stable review patch.  If anyone has any objections, please let me know.


    From: Neil Brown <>

    commit ab1b18f70a007ea6caeb007d269abb75b131a410 upstream.

    The 'struct svc_deferred_req's on the xpt_deferred queue do not
    own a reference to the owning xprt. This is seen in svc_revisit
    which is where things are added to this queue. dr->xprt is set to
    NULL and the reference to the xprt it put.

    So when this list is cleaned up in svc_delete_xprt, we mustn't
    put the reference.

    Also, replace the 'for' with a 'while' which is arguably
    simpler and more likely to compile efficiently.

    Cc: Tom Tucker <>
    Signed-off-by: NeilBrown <>
    Signed-off-by: J. Bruce Fields <>
    Signed-off-by: Greg Kroah-Hartman <>

    net/sunrpc/svc_xprt.c | 5 +----
    1 file changed, 1 insertion(+), 4 deletions(-)

    --- a/net/sunrpc/svc_xprt.c
    +++ b/net/sunrpc/svc_xprt.c
    @@ -889,11 +889,8 @@ void svc_delete_xprt(struct svc_xprt *xp
    if (test_bit(XPT_TEMP, &xprt->xpt_flags))

    - for (dr = svc_deferred_dequeue(xprt); dr;
    - dr = svc_deferred_dequeue(xprt)) {
    - svc_xprt_put(xprt);
    + while ((dr = svc_deferred_dequeue(xprt)) != NULL)
    - }


     \ /
      Last update: 2010-03-13 01:31    [W:0.023 / U:0.036 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site