Skip to content

Commit 5cfc822

Browse files
committed
NFSD: Remove macros that are no longer used
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>
1 parent d9b74bd commit 5cfc822

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

fs/nfsd/nfs4xdr.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -102,45 +102,6 @@ check_filename(char *str, int len)
102102
return 0;
103103
}
104104

105-
#define DECODE_HEAD \
106-
__be32 *p; \
107-
__be32 status
108-
#define DECODE_TAIL \
109-
status = 0; \
110-
out: \
111-
return status; \
112-
xdr_error: \
113-
dprintk("NFSD: xdr error (%s:%d)\n", \
114-
__FILE__, __LINE__); \
115-
status = nfserr_bad_xdr; \
116-
goto out
117-
118-
#define READMEM(x,nbytes) do { \
119-
x = (char *)p; \
120-
p += XDR_QUADLEN(nbytes); \
121-
} while (0)
122-
#define SAVEMEM(x,nbytes) do { \
123-
if (!(x = (p==argp->tmp || p == argp->tmpp) ? \
124-
savemem(argp, p, nbytes) : \
125-
(char *)p)) { \
126-
dprintk("NFSD: xdr error (%s:%d)\n", \
127-
__FILE__, __LINE__); \
128-
goto xdr_error; \
129-
} \
130-
p += XDR_QUADLEN(nbytes); \
131-
} while (0)
132-
#define COPYMEM(x,nbytes) do { \
133-
memcpy((x), p, nbytes); \
134-
p += XDR_QUADLEN(nbytes); \
135-
} while (0)
136-
#define READ_BUF(nbytes) \
137-
do { \
138-
p = xdr_inline_decode(argp->xdr,\
139-
nbytes); \
140-
if (!p) \
141-
goto xdr_error; \
142-
} while (0)
143-
144105
static int zero_clientid(clientid_t *clid)
145106
{
146107
return (clid->cl_boot == 0) && (clid->cl_id == 0);
@@ -5461,7 +5422,6 @@ nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p)
54615422
struct nfsd4_compoundargs *args = rqstp->rq_argp;
54625423

54635424
/* svcxdr_tmp_alloc */
5464-
args->tmpp = NULL;
54655425
args->to_free = NULL;
54665426

54675427
args->xdr = &rqstp->rq_arg_stream;

fs/nfsd/xdr4.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,6 @@ struct nfsd4_setclientid_confirm {
386386
nfs4_verifier sc_confirm;
387387
};
388388

389-
struct nfsd4_saved_compoundargs {
390-
__be32 *p;
391-
__be32 *end;
392-
int pagelen;
393-
struct page **pagelist;
394-
};
395-
396389
struct nfsd4_test_stateid_id {
397390
__be32 ts_id_status;
398391
stateid_t ts_id_stateid;
@@ -696,8 +689,6 @@ struct svcxdr_tmpbuf {
696689

697690
struct nfsd4_compoundargs {
698691
/* scratch variables for XDR decode */
699-
__be32 tmp[8];
700-
__be32 * tmpp;
701692
struct xdr_stream *xdr;
702693
struct svcxdr_tmpbuf *to_free;
703694
struct svc_rqst *rqstp;

0 commit comments

Comments
 (0)