NFSD: Remove macros that are no longer used
[ Upstream commit 5cfc822f3e77b0477e6602d399116130317f537a ] Now that all the NFSv4 decoder functions have been converted to make direct calls to the xdr helpers, remove the unused C macros. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
b24e6a40ee
commit
3aea16e6b7
@@ -102,45 +102,6 @@ check_filename(char *str, int len)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DECODE_HEAD \
|
|
||||||
__be32 *p; \
|
|
||||||
__be32 status
|
|
||||||
#define DECODE_TAIL \
|
|
||||||
status = 0; \
|
|
||||||
out: \
|
|
||||||
return status; \
|
|
||||||
xdr_error: \
|
|
||||||
dprintk("NFSD: xdr error (%s:%d)\n", \
|
|
||||||
__FILE__, __LINE__); \
|
|
||||||
status = nfserr_bad_xdr; \
|
|
||||||
goto out
|
|
||||||
|
|
||||||
#define READMEM(x,nbytes) do { \
|
|
||||||
x = (char *)p; \
|
|
||||||
p += XDR_QUADLEN(nbytes); \
|
|
||||||
} while (0)
|
|
||||||
#define SAVEMEM(x,nbytes) do { \
|
|
||||||
if (!(x = (p==argp->tmp || p == argp->tmpp) ? \
|
|
||||||
savemem(argp, p, nbytes) : \
|
|
||||||
(char *)p)) { \
|
|
||||||
dprintk("NFSD: xdr error (%s:%d)\n", \
|
|
||||||
__FILE__, __LINE__); \
|
|
||||||
goto xdr_error; \
|
|
||||||
} \
|
|
||||||
p += XDR_QUADLEN(nbytes); \
|
|
||||||
} while (0)
|
|
||||||
#define COPYMEM(x,nbytes) do { \
|
|
||||||
memcpy((x), p, nbytes); \
|
|
||||||
p += XDR_QUADLEN(nbytes); \
|
|
||||||
} while (0)
|
|
||||||
#define READ_BUF(nbytes) \
|
|
||||||
do { \
|
|
||||||
p = xdr_inline_decode(argp->xdr,\
|
|
||||||
nbytes); \
|
|
||||||
if (!p) \
|
|
||||||
goto xdr_error; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
static int zero_clientid(clientid_t *clid)
|
static int zero_clientid(clientid_t *clid)
|
||||||
{
|
{
|
||||||
return (clid->cl_boot == 0) && (clid->cl_id == 0);
|
return (clid->cl_boot == 0) && (clid->cl_id == 0);
|
||||||
@@ -5478,7 +5439,6 @@ nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p)
|
|||||||
struct nfsd4_compoundargs *args = rqstp->rq_argp;
|
struct nfsd4_compoundargs *args = rqstp->rq_argp;
|
||||||
|
|
||||||
/* svcxdr_tmp_alloc */
|
/* svcxdr_tmp_alloc */
|
||||||
args->tmpp = NULL;
|
|
||||||
args->to_free = NULL;
|
args->to_free = NULL;
|
||||||
|
|
||||||
args->xdr = &rqstp->rq_arg_stream;
|
args->xdr = &rqstp->rq_arg_stream;
|
||||||
|
@@ -386,13 +386,6 @@ struct nfsd4_setclientid_confirm {
|
|||||||
nfs4_verifier sc_confirm;
|
nfs4_verifier sc_confirm;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nfsd4_saved_compoundargs {
|
|
||||||
__be32 *p;
|
|
||||||
__be32 *end;
|
|
||||||
int pagelen;
|
|
||||||
struct page **pagelist;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct nfsd4_test_stateid_id {
|
struct nfsd4_test_stateid_id {
|
||||||
__be32 ts_id_status;
|
__be32 ts_id_status;
|
||||||
stateid_t ts_id_stateid;
|
stateid_t ts_id_stateid;
|
||||||
@@ -696,8 +689,6 @@ struct svcxdr_tmpbuf {
|
|||||||
|
|
||||||
struct nfsd4_compoundargs {
|
struct nfsd4_compoundargs {
|
||||||
/* scratch variables for XDR decode */
|
/* scratch variables for XDR decode */
|
||||||
__be32 tmp[8];
|
|
||||||
__be32 * tmpp;
|
|
||||||
struct xdr_stream *xdr;
|
struct xdr_stream *xdr;
|
||||||
struct svcxdr_tmpbuf *to_free;
|
struct svcxdr_tmpbuf *to_free;
|
||||||
struct svc_rqst *rqstp;
|
struct svc_rqst *rqstp;
|
||||||
|
Reference in New Issue
Block a user