sunrpc: remove unnecessary svc_xprt_put
authorNeil Brown <neilb@suse.de>
Fri, 26 Feb 2010 22:33:40 +0000 (09:33 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 15:50:13 +0000 (08:50 -0700)
commit967f940095b348a1f000daf3991264a5e5dbaac3
treee1a6670cba59d9719016e4e6e30f0b416e13412f
parentd234eee1361df33b8ab4dcc2a36f6bd605cdbb1a
sunrpc: remove unnecessary svc_xprt_put

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 <tom@opengridcomputing.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sunrpc/svc_xprt.c