Lines Matching refs:nbytes
114 #define READMEM(x,nbytes) do { \ argument
116 p += XDR_QUADLEN(nbytes); \
118 #define SAVEMEM(x,nbytes) do { \ argument
120 savemem(argp, p, nbytes) : \
126 p += XDR_QUADLEN(nbytes); \
128 #define COPYMEM(x,nbytes) do { \ argument
129 memcpy((x), p, nbytes); \
130 p += XDR_QUADLEN(nbytes); \
134 #define READ_BUF(nbytes) do { \ argument
135 if (nbytes <= (u32)((char *)argp->end - (char *)argp->p)) { \
137 argp->p += XDR_QUADLEN(nbytes); \
138 } else if (!(p = read_buf(argp, nbytes))) { \
158 static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) in read_buf() argument
176 if (avail < nbytes) in read_buf()
180 argp->p += XDR_QUADLEN(nbytes); in read_buf()
184 if (avail + argp->pagelen < nbytes) in read_buf()
186 if (avail + PAGE_SIZE < nbytes) /* need more than a page !! */ in read_buf()
189 if (nbytes <= sizeof(argp->tmp)) in read_buf()
193 p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); in read_buf()
205 memcpy(((char*)p)+avail, argp->p, (nbytes - avail)); in read_buf()
206 argp->p += XDR_QUADLEN(nbytes - avail); in read_buf()
310 static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) in savemem() argument
314 ret = svcxdr_tmpalloc(argp, nbytes); in savemem()
317 memcpy(ret, p, nbytes); in savemem()