Lines Matching refs:argp
101 if (!(x = (p==argp->tmp || p == argp->tmpp) ? \
102 savemem(argp, p, nbytes) : \
117 if (nbytes <= (u32)((char *)argp->end - (char *)argp->p)) { \
118 p = argp->p; \
119 argp->p += XDR_QUADLEN(nbytes); \
120 } else if (!(p = read_buf(argp, nbytes))) { \
127 static void next_decode_page(struct nfsd4_compoundargs *argp) in next_decode_page() argument
129 argp->p = page_address(argp->pagelist[0]); in next_decode_page()
130 argp->pagelist++; in next_decode_page()
131 if (argp->pagelen < PAGE_SIZE) { in next_decode_page()
132 argp->end = argp->p + XDR_QUADLEN(argp->pagelen); in next_decode_page()
133 argp->pagelen = 0; in next_decode_page()
135 argp->end = argp->p + (PAGE_SIZE>>2); in next_decode_page()
136 argp->pagelen -= PAGE_SIZE; in next_decode_page()
140 static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) in read_buf() argument
145 unsigned int avail = (char *)argp->end - (char *)argp->p; in read_buf()
147 if (avail + argp->pagelen < nbytes) in read_buf()
152 if (nbytes <= sizeof(argp->tmp)) in read_buf()
153 p = argp->tmp; in read_buf()
155 kfree(argp->tmpp); in read_buf()
156 p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); in read_buf()
166 memcpy(p, argp->p, avail); in read_buf()
167 next_decode_page(argp); in read_buf()
168 memcpy(((char*)p)+avail, argp->p, (nbytes - avail)); in read_buf()
169 argp->p += XDR_QUADLEN(nbytes - avail); in read_buf()
187 svcxdr_tmpalloc(struct nfsd4_compoundargs *argp, u32 len) in svcxdr_tmpalloc() argument
194 tb->next = argp->to_free; in svcxdr_tmpalloc()
195 argp->to_free = tb; in svcxdr_tmpalloc()
207 svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len) in svcxdr_dupstr() argument
209 char *p = svcxdr_tmpalloc(argp, len + 1); in svcxdr_dupstr()
228 static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) in savemem() argument
232 ret = svcxdr_tmpalloc(argp, nbytes); in savemem()
244 nfsd4_decode_time(struct nfsd4_compoundargs *argp, struct timespec *tv) in nfsd4_decode_time() argument
260 nfsd4_decode_bitmap(struct nfsd4_compoundargs *argp, u32 *bmval) in nfsd4_decode_bitmap() argument
286 nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, in nfsd4_decode_fattr() argument
296 if ((status = nfsd4_decode_bitmap(argp, bmval))) in nfsd4_decode_fattr()
318 *acl = svcxdr_tmpalloc(argp, nfs4_acl_bytes(nace)); in nfsd4_decode_fattr()
337 status = nfsd_map_name_to_gid(argp->rqstp, in nfsd4_decode_fattr()
340 status = nfsd_map_name_to_uid(argp->rqstp, in nfsd4_decode_fattr()
361 if ((status = nfsd_map_name_to_uid(argp->rqstp, buf, dummy32, &iattr->ia_uid))) in nfsd4_decode_fattr()
372 if ((status = nfsd_map_name_to_gid(argp->rqstp, buf, dummy32, &iattr->ia_gid))) in nfsd4_decode_fattr()
383 status = nfsd4_decode_time(argp, &iattr->ia_atime); in nfsd4_decode_fattr()
402 status = nfsd4_decode_time(argp, &iattr->ia_mtime); in nfsd4_decode_fattr()
433 label->data = svcxdr_dupstr(argp, buf, dummy32); in nfsd4_decode_fattr()
450 nfsd4_decode_stateid(struct nfsd4_compoundargs *argp, stateid_t *sid) in nfsd4_decode_stateid() argument
462 nfsd4_decode_access(struct nfsd4_compoundargs *argp, struct nfsd4_access *access) in nfsd4_decode_access() argument
472 static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_cb_sec *cbs) in nfsd4_decode_cb_sec() argument
552 static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp, struct nfsd4_backchanne… in nfsd4_decode_backchannel_ctl() argument
558 nfsd4_decode_cb_sec(argp, &bc->bc_cb_sec); in nfsd4_decode_backchannel_ctl()
563 static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp, struct nfsd4_bind_… in nfsd4_decode_bind_conn_to_session() argument
576 nfsd4_decode_close(struct nfsd4_compoundargs *argp, struct nfsd4_close *close) in nfsd4_decode_close() argument
582 return nfsd4_decode_stateid(argp, &close->cl_stateid); in nfsd4_decode_close()
589 nfsd4_decode_commit(struct nfsd4_compoundargs *argp, struct nfsd4_commit *commit) in nfsd4_decode_commit() argument
601 nfsd4_decode_create(struct nfsd4_compoundargs *argp, struct nfsd4_create *create) in nfsd4_decode_create() argument
612 create->cr_data = svcxdr_dupstr(argp, p, create->cr_datalen); in nfsd4_decode_create()
636 status = nfsd4_decode_fattr(argp, create->cr_bmval, &create->cr_iattr, in nfsd4_decode_create()
645 nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, struct nfsd4_delegreturn *dr) in nfsd4_decode_delegreturn() argument
647 return nfsd4_decode_stateid(argp, &dr->dr_stateid); in nfsd4_decode_delegreturn()
651 nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, struct nfsd4_getattr *getattr) in nfsd4_decode_getattr() argument
653 return nfsd4_decode_bitmap(argp, getattr->ga_bmval); in nfsd4_decode_getattr()
657 nfsd4_decode_link(struct nfsd4_compoundargs *argp, struct nfsd4_link *link) in nfsd4_decode_link() argument
672 nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock) in nfsd4_decode_lock() argument
691 status = nfsd4_decode_stateid(argp, &lock->lk_new_open_stateid); in nfsd4_decode_lock()
701 status = nfsd4_decode_stateid(argp, &lock->lk_old_lock_stateid); in nfsd4_decode_lock()
712 nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt) in nfsd4_decode_lockt() argument
731 nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku) in nfsd4_decode_locku() argument
740 status = nfsd4_decode_stateid(argp, &locku->lu_stateid); in nfsd4_decode_locku()
751 nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, struct nfsd4_lookup *lookup) in nfsd4_decode_lookup() argument
765 static __be32 nfsd4_decode_share_access(struct nfsd4_compoundargs *argp, u32 *share_access, u32 *de… in nfsd4_decode_share_access() argument
788 if (!argp->minorversion) in nfsd4_decode_share_access()
818 static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x) in nfsd4_decode_share_deny() argument
832 static __be32 nfsd4_decode_opaque(struct nfsd4_compoundargs *argp, struct xdr_netobj *o) in nfsd4_decode_opaque() argument
850 nfsd4_decode_open(struct nfsd4_compoundargs *argp, struct nfsd4_open *open) in nfsd4_decode_open() argument
864 status = nfsd4_decode_share_access(argp, &open->op_share_access, in nfsd4_decode_open()
868 status = nfsd4_decode_share_deny(argp, &open->op_share_deny); in nfsd4_decode_open()
873 status = nfsd4_decode_opaque(argp, &open->op_owner); in nfsd4_decode_open()
887 status = nfsd4_decode_fattr(argp, open->op_bmval, in nfsd4_decode_open()
897 if (argp->minorversion < 1) in nfsd4_decode_open()
901 status = nfsd4_decode_fattr(argp, open->op_bmval, in nfsd4_decode_open()
932 status = nfsd4_decode_stateid(argp, &open->op_delegate_stateid); in nfsd4_decode_open()
944 if (argp->minorversion < 1) in nfsd4_decode_open()
949 if (argp->minorversion < 1) in nfsd4_decode_open()
951 status = nfsd4_decode_stateid(argp, &open->op_delegate_stateid); in nfsd4_decode_open()
963 nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_open_confirm *open_conf) in nfsd4_decode_open_confirm() argument
967 if (argp->minorversion >= 1) in nfsd4_decode_open_confirm()
970 status = nfsd4_decode_stateid(argp, &open_conf->oc_req_stateid); in nfsd4_decode_open_confirm()
980 nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, struct nfsd4_open_downgrade *open_down) in nfsd4_decode_open_downgrade() argument
984 status = nfsd4_decode_stateid(argp, &open_down->od_stateid); in nfsd4_decode_open_downgrade()
989 status = nfsd4_decode_share_access(argp, &open_down->od_share_access, in nfsd4_decode_open_downgrade()
993 status = nfsd4_decode_share_deny(argp, &open_down->od_share_deny); in nfsd4_decode_open_downgrade()
1000 nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, struct nfsd4_putfh *putfh) in nfsd4_decode_putfh() argument
1015 nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, void *p) in nfsd4_decode_putpubfh() argument
1017 if (argp->minorversion == 0) in nfsd4_decode_putpubfh()
1023 nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read) in nfsd4_decode_read() argument
1027 status = nfsd4_decode_stateid(argp, &read->rd_stateid); in nfsd4_decode_read()
1038 nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *readdir) in nfsd4_decode_readdir() argument
1047 if ((status = nfsd4_decode_bitmap(argp, readdir->rd_bmval))) in nfsd4_decode_readdir()
1054 nfsd4_decode_remove(struct nfsd4_compoundargs *argp, struct nfsd4_remove *remove) in nfsd4_decode_remove() argument
1069 nfsd4_decode_rename(struct nfsd4_compoundargs *argp, struct nfsd4_rename *rename) in nfsd4_decode_rename() argument
1090 nfsd4_decode_renew(struct nfsd4_compoundargs *argp, clientid_t *clientid) in nfsd4_decode_renew() argument
1094 if (argp->minorversion >= 1) in nfsd4_decode_renew()
1104 nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp, in nfsd4_decode_secinfo() argument
1120 nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp, in nfsd4_decode_secinfo_no_name() argument
1131 nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, struct nfsd4_setattr *setattr) in nfsd4_decode_setattr() argument
1135 status = nfsd4_decode_stateid(argp, &setattr->sa_stateid); in nfsd4_decode_setattr()
1138 return nfsd4_decode_fattr(argp, setattr->sa_bmval, &setattr->sa_iattr, in nfsd4_decode_setattr()
1143 nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid *setclientid) in nfsd4_decode_setclientid() argument
1147 if (argp->minorversion >= 1) in nfsd4_decode_setclientid()
1153 status = nfsd4_decode_opaque(argp, &setclientid->se_name); in nfsd4_decode_setclientid()
1173 nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid_confirm … in nfsd4_decode_setclientid_confirm() argument
1177 if (argp->minorversion >= 1) in nfsd4_decode_setclientid_confirm()
1189 nfsd4_decode_verify(struct nfsd4_compoundargs *argp, struct nfsd4_verify *verify) in nfsd4_decode_verify() argument
1193 if ((status = nfsd4_decode_bitmap(argp, verify->ve_bmval))) in nfsd4_decode_verify()
1208 nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write) in nfsd4_decode_write() argument
1214 status = nfsd4_decode_stateid(argp, &write->wr_stateid); in nfsd4_decode_write()
1228 avail = (char*)argp->end - (char*)argp->p; in nfsd4_decode_write()
1229 if (avail + argp->pagelen < write->wr_buflen) { in nfsd4_decode_write()
1236 write->wr_pagelist = argp->pagelist; in nfsd4_decode_write()
1245 argp->pagelist += pages; in nfsd4_decode_write()
1246 argp->pagelen -= pages * PAGE_SIZE; in nfsd4_decode_write()
1249 next_decode_page(argp); in nfsd4_decode_write()
1251 argp->p += XDR_QUADLEN(len); in nfsd4_decode_write()
1257 nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, struct nfsd4_release_lockowner *rlo… in nfsd4_decode_release_lockowner() argument
1261 if (argp->minorversion >= 1) in nfsd4_decode_release_lockowner()
1270 if (argp->minorversion && !zero_clientid(&rlockowner->rl_clientid)) in nfsd4_decode_release_lockowner()
1276 nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp, in nfsd4_decode_exchange_id() argument
1285 status = nfsd4_decode_opaque(argp, &exid->clname); in nfsd4_decode_exchange_id()
1380 nfsd4_decode_create_session(struct nfsd4_compoundargs *argp, in nfsd4_decode_create_session() argument
1427 nfsd4_decode_cb_sec(argp, &sess->cb_sec); in nfsd4_decode_create_session()
1432 nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp, in nfsd4_decode_destroy_session() argument
1443 nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp, in nfsd4_decode_free_stateid() argument
1456 nfsd4_decode_sequence(struct nfsd4_compoundargs *argp, in nfsd4_decode_sequence() argument
1472 nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_stateid *test_stateid) in nfsd4_decode_test_stateid() argument
1484 stateid = svcxdr_tmpalloc(argp, sizeof(*stateid)); in nfsd4_decode_test_stateid()
1493 status = nfsd4_decode_stateid(argp, &stateid->ts_id_stateid); in nfsd4_decode_test_stateid()
1507 static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, struct nfsd4_destroy_c… in nfsd4_decode_destroy_clientid() argument
1517 static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, struct nfsd4_reclaim_c… in nfsd4_decode_reclaim_complete() argument
1529 nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp, in nfsd4_decode_getdeviceinfo() argument
1556 nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp, in nfsd4_decode_layoutget() argument
1569 status = nfsd4_decode_stateid(argp, &lgp->lg_sid); in nfsd4_decode_layoutget()
1580 nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp, in nfsd4_decode_layoutcommit() argument
1591 status = nfsd4_decode_stateid(argp, &lcp->lc_sid); in nfsd4_decode_layoutcommit()
1605 status = nfsd4_decode_time(argp, &lcp->lc_mtime); in nfsd4_decode_layoutcommit()
1628 nfsd4_decode_layoutreturn(struct nfsd4_compoundargs *argp, in nfsd4_decode_layoutreturn() argument
1643 status = nfsd4_decode_stateid(argp, &lrp->lr_sid); in nfsd4_decode_layoutreturn()
1663 nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp, in nfsd4_decode_fallocate() argument
1668 status = nfsd4_decode_stateid(argp, &fallocate->falloc_stateid); in nfsd4_decode_fallocate()
1680 nfsd4_decode_seek(struct nfsd4_compoundargs *argp, struct nfsd4_seek *seek) in nfsd4_decode_seek() argument
1684 status = nfsd4_decode_stateid(argp, &seek->seek_stateid); in nfsd4_decode_seek()
1696 nfsd4_decode_noop(struct nfsd4_compoundargs *argp, void *p) in nfsd4_decode_noop() argument
1702 nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p) in nfsd4_decode_notsupp() argument
1707 typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *);
1793 nfsd4_opnum_in_range(struct nfsd4_compoundargs *argp, struct nfsd4_op *op) in nfsd4_opnum_in_range() argument
1797 else if (argp->minorversion == 0 && op->opnum > LAST_NFS40_OP) in nfsd4_opnum_in_range()
1799 else if (argp->minorversion == 1 && op->opnum > LAST_NFS41_OP) in nfsd4_opnum_in_range()
1801 else if (argp->minorversion == 2 && op->opnum > LAST_NFS42_OP) in nfsd4_opnum_in_range()
1807 nfsd4_decode_compound(struct nfsd4_compoundargs *argp) in nfsd4_decode_compound() argument
1812 int auth_slack= argp->rqstp->rq_auth_slack; in nfsd4_decode_compound()
1819 argp->taglen = be32_to_cpup(p++); in nfsd4_decode_compound()
1820 READ_BUF(argp->taglen); in nfsd4_decode_compound()
1821 SAVEMEM(argp->tag, argp->taglen); in nfsd4_decode_compound()
1823 argp->minorversion = be32_to_cpup(p++); in nfsd4_decode_compound()
1824 argp->opcnt = be32_to_cpup(p++); in nfsd4_decode_compound()
1825 max_reply += 4 + (XDR_QUADLEN(argp->taglen) << 2); in nfsd4_decode_compound()
1827 if (argp->taglen > NFSD4_MAX_TAGLEN) in nfsd4_decode_compound()
1829 if (argp->opcnt > 100) in nfsd4_decode_compound()
1832 if (argp->opcnt > ARRAY_SIZE(argp->iops)) { in nfsd4_decode_compound()
1833 argp->ops = kzalloc(argp->opcnt * sizeof(*argp->ops), GFP_KERNEL); in nfsd4_decode_compound()
1834 if (!argp->ops) { in nfsd4_decode_compound()
1835 argp->ops = argp->iops; in nfsd4_decode_compound()
1841 if (argp->minorversion > NFSD_SUPPORTED_MINOR_VERSION) in nfsd4_decode_compound()
1842 argp->opcnt = 0; in nfsd4_decode_compound()
1844 for (i = 0; i < argp->opcnt; i++) { in nfsd4_decode_compound()
1845 op = &argp->ops[i]; in nfsd4_decode_compound()
1851 if (nfsd4_opnum_in_range(argp, op)) in nfsd4_decode_compound()
1852 op->status = nfsd4_dec_ops[op->opnum](argp, &op->u); in nfsd4_decode_compound()
1865 readbytes += nfsd4_max_reply(argp->rqstp, op); in nfsd4_decode_compound()
1867 max_reply += nfsd4_max_reply(argp->rqstp, op); in nfsd4_decode_compound()
1878 argp->opcnt = i+1; in nfsd4_decode_compound()
1883 if (argp->minorversion) in nfsd4_decode_compound()
1885 svc_reserve(argp->rqstp, max_reply + readbytes); in nfsd4_decode_compound()
1886 argp->rqstp->rq_cachetype = cachethis ? RC_REPLBUFF : RC_NOCACHE; in nfsd4_decode_compound()
1889 clear_bit(RQ_SPLICE_OK, &argp->rqstp->rq_flags); in nfsd4_decode_compound()