diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index e50cfa3..4fce0f2 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -152,7 +152,7 @@ lockd(void *vrqstp) */ while (!kthread_should_stop()) { long timeout = MAX_SCHEDULE_TIMEOUT; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); /* update sv_maxconn if it has changed */ rqstp->rq_server->sv_maxconn = nlm_max_connections; diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 73ab220..e05b6fc 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -352,7 +352,7 @@ static int check_gss_callback_principal(struct nfs_client *clp, static int nfs_callback_authenticate(struct svc_rqst *rqstp) { struct nfs_client *clp; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); int ret = SVC_OK; /* Don't talk to strangers */ diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 1c12177..7a84433 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -90,7 +90,7 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp, /* Check if the request originated from a secure port. */ if (!rqstp->rq_secure && (flags & NFSEXP_INSECURE_PORT)) { - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); dprintk(KERN_WARNING "nfsd: request from insecure port %s!\n", svc_print_addr(rqstp, buf, sizeof(buf))); diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index c2786f2..13185bb 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h @@ -52,11 +52,11 @@ extern unsigned int nlm_debug; #ifdef RPC_DEBUG # define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) # define dfprintk(fac, args...) do { ifdebug(fac) printk(args); } while(0) -# define RPC_IFDEBUG(x) x +# define RPCBUF_IFDEBUG(x) char x[RPC_MAX_ADDRBUFLEN] #else # define ifdebug(fac) if (0) # define dfprintk(fac, args...) do ; while (0) -# define RPC_IFDEBUG(x) +# define RPCBUF_IFDEBUG(x) char x[0] #endif /* diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 870929e..425c4c1 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -228,7 +228,7 @@ static int svc_sendto(struct svc_rqst *rqstp, struct xdr_buf *xdr) int len = 0; unsigned long tailoff; unsigned long headoff; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); if (rqstp->rq_prot == IPPROTO_UDP) { struct msghdr msg = { @@ -808,7 +808,7 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt) struct socket *newsock; struct svc_sock *newsvsk; int err, slen; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); dprintk("svc: tcp_accept %p sock %p\n", svsk, sock); if (!sock) @@ -1410,7 +1410,7 @@ static struct svc_xprt *svc_create_socket(struct svc_serv *serv, int newlen; int family; int val; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); dprintk("svc: svc_create_socket(%s, %d, %s)\n", serv->sv_program->pg_name, protocol,