From 1b092092bf0e2e8b7af1c2a03f615b4e60b05d47 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 8 Jan 2013 09:26:49 -0500 Subject: SUNRPC: Pass a pointer to struct rpc_xprt to the connect callback Avoid another RCU dereference by passing the pointer to struct rpc_xprt from the caller. Signed-off-by: Trond Myklebust --- include/linux/sunrpc/xprt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 951cb9b7d02b..7dd598a5c9aa 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -117,7 +117,7 @@ struct rpc_xprt_ops { void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task); void (*rpcbind)(struct rpc_task *task); void (*set_port)(struct rpc_xprt *xprt, unsigned short port); - void (*connect)(struct rpc_task *task); + void (*connect)(struct rpc_xprt *xprt, struct rpc_task *task); void * (*buf_alloc)(struct rpc_task *task, size_t size); void (*buf_free)(void *buffer); int (*send_request)(struct rpc_task *task); -- cgit v1.2.3 From 6a24dfb645dbcb05b34d08b991d082bdaa3ff072 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 8 Jan 2013 09:48:15 -0500 Subject: SUNRPC: Pass pointers to struct rpc_xprt to the congestion window Avoid access to task->tk_xprt Signed-off-by: Trond Myklebust --- include/linux/sunrpc/xprt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 7dd598a5c9aa..30834be03011 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -122,7 +122,7 @@ struct rpc_xprt_ops { void (*buf_free)(void *buffer); int (*send_request)(struct rpc_task *task); void (*set_retrans_timeout)(struct rpc_task *task); - void (*timer)(struct rpc_task *task); + void (*timer)(struct rpc_xprt *xprt, struct rpc_task *task); void (*release_request)(struct rpc_task *task); void (*close)(struct rpc_xprt *xprt); void (*destroy)(struct rpc_xprt *xprt); @@ -313,7 +313,7 @@ void xprt_set_retrans_timeout_rtt(struct rpc_task *task); void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action); void xprt_write_space(struct rpc_xprt *xprt); -void xprt_adjust_cwnd(struct rpc_task *task, int result); +void xprt_adjust_cwnd(struct rpc_xprt *xprt, struct rpc_task *task, int result); struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid); void xprt_complete_rqst(struct rpc_task *task, int copied); void xprt_release_rqst_cong(struct rpc_task *task); -- cgit v1.2.3 From 77102893ae685270c1774fa8b7eead6ad93c838d Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 8 Jan 2013 10:10:04 -0500 Subject: SUNRPC: Nuke the tk_xprt macro It is no longer in use Signed-off-by: Trond Myklebust --- include/linux/sunrpc/sched.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index b64f8eb0b973..84ca436b76c2 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -87,7 +87,6 @@ struct rpc_task { tk_cred_retry : 2, tk_rebind_retry : 2; }; -#define tk_xprt tk_client->cl_xprt /* support walking a list of tasks on a wait queue */ #define task_for_each(task, pos, head) \ -- cgit v1.2.3