]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sunrpc: Allow xprt->ops->timer method to sleep
authorChuck Lever <chuck.lever@oracle.com>
Wed, 8 Feb 2017 22:00:51 +0000 (17:00 -0500)
committerBrian Maly <brian.maly@oracle.com>
Tue, 8 May 2018 20:38:24 +0000 (16:38 -0400)
commit1de90feba85832365f81b69cacf35969e217bea0
treef01698592728b411d5da230c0fdc6392268e2219
parent2dd6623cd27dd0df8cee09f76294235fa58d5779
sunrpc: Allow xprt->ops->timer method to sleep

The transport lock is needed to protect the xprt_adjust_cwnd() call
in xs_udp_timer, but it is not necessary for accessing the
rq_reply_bytes_recvd or tk_status fields. It is correct to sublimate
the lock into UDP's xs_udp_timer method, where it is required.

The ->timer method has to take the transport lock if needed, but it
can now sleep safely, or even call back into the RPC scheduler.

This is more a clean-up than a fix, but the "issue" was introduced
by my transport switch patches back in 2005.

Fixes: 46c0ee8bc4ad ("RPC: separate xprt_timer implementations")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Orabug: 27587008

(cherry picked from commit b977b644ccf821ab1269582f7efe1d0d85faa1f6)
Signed-off-by: Calum Mackay <calum.mackay@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
net/sunrpc/xprt.c
net/sunrpc/xprtsock.c