• Home
  • Raw
  • Download

Lines Matching refs:argp

110 	if (!(x = (p==argp->tmp || p == argp->tmpp) ? \
111 savemem(argp, p, nbytes) : \
126 if (nbytes <= (u32)((char *)argp->end - (char *)argp->p)) { \
127 p = argp->p; \
128 argp->p += XDR_QUADLEN(nbytes); \
129 } else if (!(p = read_buf(argp, nbytes))) { \
136 static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) in read_buf() argument
141 unsigned int avail = (char *)argp->end - (char *)argp->p; in read_buf()
143 if (avail + argp->pagelen < nbytes) in read_buf()
148 if (nbytes <= sizeof(argp->tmp)) in read_buf()
149 p = argp->tmp; in read_buf()
151 kfree(argp->tmpp); in read_buf()
152 p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); in read_buf()
162 memcpy(p, argp->p, avail); in read_buf()
164 argp->pagelist++; in read_buf()
165 argp->p = page_address(argp->pagelist[0]); in read_buf()
166 if (argp->pagelen < PAGE_SIZE) { in read_buf()
167 argp->end = argp->p + (argp->pagelen>>2); in read_buf()
168 argp->pagelen = 0; in read_buf()
170 argp->end = argp->p + (PAGE_SIZE>>2); in read_buf()
171 argp->pagelen -= PAGE_SIZE; in read_buf()
173 memcpy(((char*)p)+avail, argp->p, (nbytes - avail)); in read_buf()
174 argp->p += XDR_QUADLEN(nbytes - avail); in read_buf()
184 defer_free(struct nfsd4_compoundargs *argp, in defer_free() argument
194 tb->next = argp->to_free; in defer_free()
195 argp->to_free = tb; in defer_free()
199 static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) in savemem() argument
201 if (p == argp->tmp) { in savemem()
202 p = kmemdup(argp->tmp, nbytes, GFP_KERNEL); in savemem()
206 BUG_ON(p != argp->tmpp); in savemem()
207 argp->tmpp = NULL; in savemem()
209 if (defer_free(argp, kfree, p)) { in savemem()
217 nfsd4_decode_bitmap(struct nfsd4_compoundargs *argp, u32 *bmval) in nfsd4_decode_bitmap() argument
243 nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, in nfsd4_decode_fattr() argument
253 if ((status = nfsd4_decode_bitmap(argp, bmval))) in nfsd4_decode_fattr()
280 defer_free(argp, kfree, *acl); in nfsd4_decode_fattr()
297 status = nfsd_map_name_to_gid(argp->rqstp, in nfsd4_decode_fattr()
300 status = nfsd_map_name_to_uid(argp->rqstp, in nfsd4_decode_fattr()
321 if ((status = nfsd_map_name_to_uid(argp->rqstp, buf, dummy32, &iattr->ia_uid))) in nfsd4_decode_fattr()
332 if ((status = nfsd_map_name_to_gid(argp->rqstp, buf, dummy32, &iattr->ia_gid))) in nfsd4_decode_fattr()
397 nfsd4_decode_stateid(struct nfsd4_compoundargs *argp, stateid_t *sid) in nfsd4_decode_stateid() argument
409 nfsd4_decode_access(struct nfsd4_compoundargs *argp, struct nfsd4_access *access) in nfsd4_decode_access() argument
419 static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp, struct nfsd4_bind_… in nfsd4_decode_bind_conn_to_session() argument
432 nfsd4_decode_close(struct nfsd4_compoundargs *argp, struct nfsd4_close *close) in nfsd4_decode_close() argument
438 return nfsd4_decode_stateid(argp, &close->cl_stateid); in nfsd4_decode_close()
445 nfsd4_decode_commit(struct nfsd4_compoundargs *argp, struct nfsd4_commit *commit) in nfsd4_decode_commit() argument
457 nfsd4_decode_create(struct nfsd4_compoundargs *argp, struct nfsd4_create *create) in nfsd4_decode_create() argument
490 status = nfsd4_decode_fattr(argp, create->cr_bmval, &create->cr_iattr, in nfsd4_decode_create()
499 nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, struct nfsd4_delegreturn *dr) in nfsd4_decode_delegreturn() argument
501 return nfsd4_decode_stateid(argp, &dr->dr_stateid); in nfsd4_decode_delegreturn()
505 nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, struct nfsd4_getattr *getattr) in nfsd4_decode_getattr() argument
507 return nfsd4_decode_bitmap(argp, getattr->ga_bmval); in nfsd4_decode_getattr()
511 nfsd4_decode_link(struct nfsd4_compoundargs *argp, struct nfsd4_link *link) in nfsd4_decode_link() argument
526 nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock) in nfsd4_decode_lock() argument
545 status = nfsd4_decode_stateid(argp, &lock->lk_new_open_stateid); in nfsd4_decode_lock()
555 status = nfsd4_decode_stateid(argp, &lock->lk_old_lock_stateid); in nfsd4_decode_lock()
566 nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt) in nfsd4_decode_lockt() argument
585 nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku) in nfsd4_decode_locku() argument
594 status = nfsd4_decode_stateid(argp, &locku->lu_stateid); in nfsd4_decode_locku()
605 nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, struct nfsd4_lookup *lookup) in nfsd4_decode_lookup() argument
619 static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *share_access, u32 *de… in nfsd4_decode_share_access() argument
642 if (!argp->minorversion) in nfsd4_decode_share_access()
672 static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x) in nfsd4_decode_share_deny() argument
686 static __be32 nfsd4_decode_opaque(struct nfsd4_compoundargs *argp, struct xdr_netobj *o) in nfsd4_decode_opaque() argument
704 nfsd4_decode_open(struct nfsd4_compoundargs *argp, struct nfsd4_open *open) in nfsd4_decode_open() argument
717 status = nfsd4_decode_share_access(argp, &open->op_share_access, in nfsd4_decode_open()
721 status = nfsd4_decode_share_deny(argp, &open->op_share_deny); in nfsd4_decode_open()
726 status = nfsd4_decode_opaque(argp, &open->op_owner); in nfsd4_decode_open()
740 status = nfsd4_decode_fattr(argp, open->op_bmval, in nfsd4_decode_open()
750 if (argp->minorversion < 1) in nfsd4_decode_open()
754 status = nfsd4_decode_fattr(argp, open->op_bmval, in nfsd4_decode_open()
785 status = nfsd4_decode_stateid(argp, &open->op_delegate_stateid); in nfsd4_decode_open()
797 if (argp->minorversion < 1) in nfsd4_decode_open()
802 if (argp->minorversion < 1) in nfsd4_decode_open()
804 status = nfsd4_decode_stateid(argp, &open->op_delegate_stateid); in nfsd4_decode_open()
816 nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_open_confirm *open_conf) in nfsd4_decode_open_confirm() argument
820 status = nfsd4_decode_stateid(argp, &open_conf->oc_req_stateid); in nfsd4_decode_open_confirm()
830 nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, struct nfsd4_open_downgrade *open_down) in nfsd4_decode_open_downgrade() argument
834 status = nfsd4_decode_stateid(argp, &open_down->od_stateid); in nfsd4_decode_open_downgrade()
839 status = nfsd4_decode_share_access(argp, &open_down->od_share_access, in nfsd4_decode_open_downgrade()
843 status = nfsd4_decode_share_deny(argp, &open_down->od_share_deny); in nfsd4_decode_open_downgrade()
850 nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, struct nfsd4_putfh *putfh) in nfsd4_decode_putfh() argument
865 nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read) in nfsd4_decode_read() argument
869 status = nfsd4_decode_stateid(argp, &read->rd_stateid); in nfsd4_decode_read()
880 nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *readdir) in nfsd4_decode_readdir() argument
889 if ((status = nfsd4_decode_bitmap(argp, readdir->rd_bmval))) in nfsd4_decode_readdir()
896 nfsd4_decode_remove(struct nfsd4_compoundargs *argp, struct nfsd4_remove *remove) in nfsd4_decode_remove() argument
911 nfsd4_decode_rename(struct nfsd4_compoundargs *argp, struct nfsd4_rename *rename) in nfsd4_decode_rename() argument
931 nfsd4_decode_renew(struct nfsd4_compoundargs *argp, clientid_t *clientid) in nfsd4_decode_renew() argument
942 nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp, in nfsd4_decode_secinfo() argument
959 nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp, in nfsd4_decode_secinfo_no_name() argument
970 nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, struct nfsd4_setattr *setattr) in nfsd4_decode_setattr() argument
974 status = nfsd4_decode_stateid(argp, &setattr->sa_stateid); in nfsd4_decode_setattr()
977 return nfsd4_decode_fattr(argp, setattr->sa_bmval, &setattr->sa_iattr, in nfsd4_decode_setattr()
982 nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid *setclientid) in nfsd4_decode_setclientid() argument
989 status = nfsd4_decode_opaque(argp, &setclientid->se_name); in nfsd4_decode_setclientid()
1008 nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid_confirm … in nfsd4_decode_setclientid_confirm() argument
1021 nfsd4_decode_verify(struct nfsd4_compoundargs *argp, struct nfsd4_verify *verify) in nfsd4_decode_verify() argument
1025 .p = argp->p, in nfsd4_decode_verify()
1026 .end = argp->end, in nfsd4_decode_verify()
1027 .rqstp = argp->rqstp, in nfsd4_decode_verify()
1035 if ((status = nfsd4_decode_bitmap(argp, verify->ve_bmval))) in nfsd4_decode_verify()
1057 nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write) in nfsd4_decode_write() argument
1064 status = nfsd4_decode_stateid(argp, &write->wr_stateid); in nfsd4_decode_write()
1078 avail = (char*)argp->end - (char*)argp->p; in nfsd4_decode_write()
1079 if (avail + argp->pagelen < write->wr_buflen) { in nfsd4_decode_write()
1084 argp->rqstp->rq_vec[0].iov_base = p; in nfsd4_decode_write()
1085 argp->rqstp->rq_vec[0].iov_len = avail; in nfsd4_decode_write()
1088 while (len > argp->rqstp->rq_vec[v].iov_len) { in nfsd4_decode_write()
1089 len -= argp->rqstp->rq_vec[v].iov_len; in nfsd4_decode_write()
1091 argp->rqstp->rq_vec[v].iov_base = page_address(argp->pagelist[0]); in nfsd4_decode_write()
1092 argp->pagelist++; in nfsd4_decode_write()
1093 if (argp->pagelen >= PAGE_SIZE) { in nfsd4_decode_write()
1094 argp->rqstp->rq_vec[v].iov_len = PAGE_SIZE; in nfsd4_decode_write()
1095 argp->pagelen -= PAGE_SIZE; in nfsd4_decode_write()
1097 argp->rqstp->rq_vec[v].iov_len = argp->pagelen; in nfsd4_decode_write()
1098 argp->pagelen -= len; in nfsd4_decode_write()
1101 argp->end = (__be32*) (argp->rqstp->rq_vec[v].iov_base + argp->rqstp->rq_vec[v].iov_len); in nfsd4_decode_write()
1102 argp->p = (__be32*) (argp->rqstp->rq_vec[v].iov_base + (XDR_QUADLEN(len) << 2)); in nfsd4_decode_write()
1103 argp->rqstp->rq_vec[v].iov_len = len; in nfsd4_decode_write()
1110 nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, struct nfsd4_release_lockowner *rlo… in nfsd4_decode_release_lockowner() argument
1120 if (argp->minorversion && !zero_clientid(&rlockowner->rl_clientid)) in nfsd4_decode_release_lockowner()
1126 nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp, in nfsd4_decode_exchange_id() argument
1135 status = nfsd4_decode_opaque(argp, &exid->clname); in nfsd4_decode_exchange_id()
1230 nfsd4_decode_create_session(struct nfsd4_compoundargs *argp, in nfsd4_decode_create_session() argument
1335 nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp, in nfsd4_decode_destroy_session() argument
1346 nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp, in nfsd4_decode_free_stateid() argument
1359 nfsd4_decode_sequence(struct nfsd4_compoundargs *argp, in nfsd4_decode_sequence() argument
1375 nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_stateid *test_stateid) in nfsd4_decode_test_stateid() argument
1393 defer_free(argp, kfree, stateid); in nfsd4_decode_test_stateid()
1397 status = nfsd4_decode_stateid(argp, &stateid->ts_id_stateid); in nfsd4_decode_test_stateid()
1411 static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, struct nfsd4_destroy_c… in nfsd4_decode_destroy_clientid() argument
1421 static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, struct nfsd4_reclaim_c… in nfsd4_decode_reclaim_complete() argument
1432 nfsd4_decode_noop(struct nfsd4_compoundargs *argp, void *p) in nfsd4_decode_noop() argument
1438 nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p) in nfsd4_decode_notsupp() argument
1443 typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *);
1557 nfsd4_decode_compound(struct nfsd4_compoundargs *argp) in nfsd4_decode_compound() argument
1572 READ32(argp->taglen); in nfsd4_decode_compound()
1573 READ_BUF(argp->taglen + 8); in nfsd4_decode_compound()
1574 SAVEMEM(argp->tag, argp->taglen); in nfsd4_decode_compound()
1575 READ32(argp->minorversion); in nfsd4_decode_compound()
1576 READ32(argp->opcnt); in nfsd4_decode_compound()
1578 if (argp->taglen > NFSD4_MAX_TAGLEN) in nfsd4_decode_compound()
1580 if (argp->opcnt > 100) in nfsd4_decode_compound()
1583 if (argp->opcnt > ARRAY_SIZE(argp->iops)) { in nfsd4_decode_compound()
1584 argp->ops = kmalloc(argp->opcnt * sizeof(*argp->ops), GFP_KERNEL); in nfsd4_decode_compound()
1585 if (!argp->ops) { in nfsd4_decode_compound()
1586 argp->ops = argp->iops; in nfsd4_decode_compound()
1592 if (argp->minorversion >= ARRAY_SIZE(nfsd4_minorversion)) in nfsd4_decode_compound()
1593 argp->opcnt = 0; in nfsd4_decode_compound()
1595 ops = &nfsd4_minorversion[argp->minorversion]; in nfsd4_decode_compound()
1596 for (i = 0; i < argp->opcnt; i++) { in nfsd4_decode_compound()
1597 op = &argp->ops[i]; in nfsd4_decode_compound()
1607 if (argp->p == argp->end) { in nfsd4_decode_compound()
1608 if (argp->pagelen < 4) { in nfsd4_decode_compound()
1612 argp->opcnt = i+1; in nfsd4_decode_compound()
1621 argp->p = page_address(argp->pagelist[0]); in nfsd4_decode_compound()
1622 argp->pagelist++; in nfsd4_decode_compound()
1623 if (argp->pagelen < PAGE_SIZE) { in nfsd4_decode_compound()
1624 argp->end = argp->p + (argp->pagelen>>2); in nfsd4_decode_compound()
1625 argp->pagelen = 0; in nfsd4_decode_compound()
1627 argp->end = argp->p + (PAGE_SIZE>>2); in nfsd4_decode_compound()
1628 argp->pagelen -= PAGE_SIZE; in nfsd4_decode_compound()
1631 op->opnum = ntohl(*argp->p++); in nfsd4_decode_compound()
1634 op->status = ops->decoders[op->opnum](argp, &op->u); in nfsd4_decode_compound()
1641 argp->opcnt = i+1; in nfsd4_decode_compound()
1651 if (argp->minorversion) in nfsd4_decode_compound()
1653 argp->rqstp->rq_cachetype = cachethis ? RC_REPLBUFF : RC_NOCACHE; in nfsd4_decode_compound()