mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
SUNRPC: sunrpc should not explicitly depend on NFS config options
Change explicit references to CONFIG_NFS_V4_1 to implicit ones Get rid of the unnecessary defines in backchannel_rqst.c and bc_svc.c: the Makefile takes care of those dependency. Signed-off-by: Trond Myklebust <[email protected]>
This commit is contained in:
parent
1f9453578f
commit
9e00abc3c2
13 changed files with 39 additions and 40 deletions
|
|
@ -4,6 +4,10 @@ config SUNRPC
|
|||
config SUNRPC_GSS
|
||||
tristate
|
||||
|
||||
config SUNRPC_BACKCHANNEL
|
||||
bool
|
||||
depends on SUNRPC
|
||||
|
||||
config SUNRPC_XPRT_RDMA
|
||||
tristate
|
||||
depends on SUNRPC && INFINIBAND && INFINIBAND_ADDR_TRANS && EXPERIMENTAL
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ sunrpc-y := clnt.o xprt.o socklib.o xprtsock.o sched.o \
|
|||
addr.o rpcb_clnt.o timer.o xdr.o \
|
||||
sunrpc_syms.o cache.o rpc_pipe.o \
|
||||
svc_xprt.o
|
||||
sunrpc-$(CONFIG_NFS_V4_1) += backchannel_rqst.o bc_svc.o
|
||||
sunrpc-$(CONFIG_SUNRPC_BACKCHANNEL) += backchannel_rqst.o bc_svc.o
|
||||
sunrpc-$(CONFIG_PROC_FS) += stats.o
|
||||
sunrpc-$(CONFIG_SYSCTL) += sysctl.o
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define RPCDBG_FACILITY RPCDBG_TRANS
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
|
||||
/*
|
||||
* Helper routines that track the number of preallocation elements
|
||||
* on the transport.
|
||||
|
|
@ -279,4 +277,3 @@ void xprt_free_bc_request(struct rpc_rqst *req)
|
|||
spin_unlock_bh(&xprt->bc_pa_lock);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
* reply over an existing open connection previously established by the client.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <linux/sunrpc/xprt.h>
|
||||
|
|
@ -63,4 +61,3 @@ int bc_send(struct rpc_rqst *req)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ static void call_decode(struct rpc_task *task);
|
|||
static void call_bind(struct rpc_task *task);
|
||||
static void call_bind_status(struct rpc_task *task);
|
||||
static void call_transmit(struct rpc_task *task);
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
static void call_bc_transmit(struct rpc_task *task);
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
static void call_status(struct rpc_task *task);
|
||||
static void call_transmit_status(struct rpc_task *task);
|
||||
static void call_refresh(struct rpc_task *task);
|
||||
|
|
@ -716,7 +716,7 @@ rpc_call_async(struct rpc_clnt *clnt, const struct rpc_message *msg, int flags,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(rpc_call_async);
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
/**
|
||||
* rpc_run_bc_task - Allocate a new RPC task for backchannel use, then run
|
||||
* rpc_execute against it
|
||||
|
|
@ -759,7 +759,7 @@ out:
|
|||
dprintk("RPC: rpc_run_bc_task: task= %p\n", task);
|
||||
return task;
|
||||
}
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
|
||||
void
|
||||
rpc_call_start(struct rpc_task *task)
|
||||
|
|
@ -1362,7 +1362,7 @@ call_transmit_status(struct rpc_task *task)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
/*
|
||||
* 5b. Send the backchannel RPC reply. On error, drop the reply. In
|
||||
* addition, disconnect on connectivity errors.
|
||||
|
|
@ -1426,7 +1426,7 @@ call_bc_transmit(struct rpc_task *task)
|
|||
}
|
||||
rpc_wake_up_queued_task(&req->rq_xprt->pending, task);
|
||||
}
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
|
||||
/*
|
||||
* 6. Sort out the RPC call status
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,7 @@ svc_process(struct svc_rqst *rqstp)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
/*
|
||||
* Process a backchannel RPC request that arrived over an existing
|
||||
* outbound connection
|
||||
|
|
@ -1301,7 +1301,7 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
|
|||
}
|
||||
}
|
||||
EXPORT_SYMBOL(bc_svc_process);
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
|
||||
/*
|
||||
* Return (transport-specific) limit on the rpc payload.
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ static void svc_sock_free(struct svc_xprt *);
|
|||
static struct svc_xprt *svc_create_socket(struct svc_serv *, int,
|
||||
struct net *, struct sockaddr *,
|
||||
int, int);
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
static struct svc_xprt *svc_bc_create_socket(struct svc_serv *, int,
|
||||
struct net *, struct sockaddr *,
|
||||
int, int);
|
||||
static void svc_bc_sock_free(struct svc_xprt *xprt);
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
static struct lock_class_key svc_key[2];
|
||||
|
|
@ -1241,7 +1241,7 @@ static struct svc_xprt *svc_tcp_create(struct svc_serv *serv,
|
|||
return svc_create_socket(serv, IPPROTO_TCP, net, sa, salen, flags);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
static struct svc_xprt *svc_bc_create_socket(struct svc_serv *, int,
|
||||
struct net *, struct sockaddr *,
|
||||
int, int);
|
||||
|
|
@ -1282,7 +1282,7 @@ static void svc_cleanup_bc_xprt_sock(void)
|
|||
{
|
||||
svc_unreg_xprt_class(&svc_tcp_bc_class);
|
||||
}
|
||||
#else /* CONFIG_NFS_V4_1 */
|
||||
#else /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
static void svc_init_bc_xprt_sock(void)
|
||||
{
|
||||
}
|
||||
|
|
@ -1290,7 +1290,7 @@ static void svc_init_bc_xprt_sock(void)
|
|||
static void svc_cleanup_bc_xprt_sock(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
|
||||
static struct svc_xprt_ops svc_tcp_ops = {
|
||||
.xpo_create = svc_tcp_create,
|
||||
|
|
@ -1621,7 +1621,7 @@ static void svc_sock_free(struct svc_xprt *xprt)
|
|||
kfree(svsk);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
/*
|
||||
* Create a back channel svc_xprt which shares the fore channel socket.
|
||||
*/
|
||||
|
|
@ -1660,4 +1660,4 @@ static void svc_bc_sock_free(struct svc_xprt *xprt)
|
|||
if (xprt)
|
||||
kfree(container_of(xprt, struct svc_sock, sk_xprt));
|
||||
}
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
|
|
|
|||
|
|
@ -1111,10 +1111,10 @@ found:
|
|||
|
||||
INIT_LIST_HEAD(&xprt->free);
|
||||
INIT_LIST_HEAD(&xprt->recv);
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
spin_lock_init(&xprt->bc_pa_lock);
|
||||
INIT_LIST_HEAD(&xprt->bc_pa_list);
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
|
||||
INIT_WORK(&xprt->task_cleanup, xprt_autoclose);
|
||||
if (xprt_has_timer(xprt))
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#include <linux/sunrpc/svcsock.h>
|
||||
#include <linux/sunrpc/xprtsock.h>
|
||||
#include <linux/file.h>
|
||||
#ifdef CONFIG_NFS_V4_1
|
||||
#ifdef CONFIG_SUNRPC_BACKCHANNEL
|
||||
#include <linux/sunrpc/bc_xprt.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -1236,7 +1236,7 @@ static inline int xs_tcp_read_reply(struct rpc_xprt *xprt,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
|
||||
/*
|
||||
* Obtains an rpc_rqst previously allocated and invokes the common
|
||||
* tcp read code to read the data. The result is placed in the callback
|
||||
|
|
@ -1299,7 +1299,7 @@ static inline int _xs_tcp_read_data(struct rpc_xprt *xprt,
|
|||
{
|
||||
return xs_tcp_read_reply(xprt, desc);
|
||||
}
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
#endif /* CONFIG_SUNRPC_BACKCHANNEL */
|
||||
|
||||
/*
|
||||
* Read data off the transport. This can be either an RPC_CALL or an
|
||||
|
|
|
|||
Loading…
Reference in a new issue