Lines Matching refs:nbytes
111 #define READMEM(x,nbytes) do { \ argument
113 p += XDR_QUADLEN(nbytes); \
115 #define SAVEMEM(x,nbytes) do { \ argument
117 savemem(argp, p, nbytes) : \
123 p += XDR_QUADLEN(nbytes); \
125 #define COPYMEM(x,nbytes) do { \ argument
126 memcpy((x), p, nbytes); \
127 p += XDR_QUADLEN(nbytes); \
131 #define READ_BUF(nbytes) do { \ argument
132 if (nbytes <= (u32)((char *)argp->end - (char *)argp->p)) { \
134 argp->p += XDR_QUADLEN(nbytes); \
135 } else if (!(p = read_buf(argp, nbytes))) { \
155 static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) in read_buf() argument
173 if (avail < nbytes) in read_buf()
177 argp->p += XDR_QUADLEN(nbytes); in read_buf()
181 if (avail + argp->pagelen < nbytes) in read_buf()
183 if (avail + PAGE_SIZE < nbytes) /* need more than a page !! */ in read_buf()
186 if (nbytes <= sizeof(argp->tmp)) in read_buf()
190 p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); in read_buf()
202 memcpy(((char*)p)+avail, argp->p, (nbytes - avail)); in read_buf()
203 argp->p += XDR_QUADLEN(nbytes - avail); in read_buf()
269 static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) in savemem() argument
273 ret = svcxdr_tmpalloc(argp, nbytes); in savemem()
276 memcpy(ret, p, nbytes); in savemem()