aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svc_xprt.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2010-03-29 21:02:31 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-03-29 21:02:31 -0400
commit788e69e548cc8d127b90f0de1f7b7e983d1d587a (patch)
treeb8312151a877978d579af189789e1f3f477f3a5f /net/sunrpc/svc_xprt.c
parenta5990ea1254cd186b38744507aeec3136a0c1c95 (diff)
svcrpc: don't hold sv_lock over svc_xprt_put()
svc_xprt_put() can call tcp_close(), which can sleep, so we shouldn't be holding this lock. In fact, only the xpt_list removal and the sv_tmpcnt decrement should need the sv_lock here. Reported-by: Mi Jinlong <mijinlong@cn.fujitsu.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r--net/sunrpc/svc_xprt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 8f0f1fb3dc52..c334f5413c60 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -892,12 +892,12 @@ void svc_delete_xprt(struct svc_xprt *xprt)
892 */ 892 */
893 if (test_bit(XPT_TEMP, &xprt->xpt_flags)) 893 if (test_bit(XPT_TEMP, &xprt->xpt_flags))
894 serv->sv_tmpcnt--; 894 serv->sv_tmpcnt--;
895 spin_unlock_bh(&serv->sv_lock);
895 896
896 while ((dr = svc_deferred_dequeue(xprt)) != NULL) 897 while ((dr = svc_deferred_dequeue(xprt)) != NULL)
897 kfree(dr); 898 kfree(dr);
898 899
899 svc_xprt_put(xprt); 900 svc_xprt_put(xprt);
900 spin_unlock_bh(&serv->sv_lock);
901} 901}
902 902
903void svc_close_xprt(struct svc_xprt *xprt) 903void svc_close_xprt(struct svc_xprt *xprt)