Lines Matching refs:rqstp
94 check_attr_support(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in check_attr_support() argument
130 nfsd4_check_open_attributes(struct svc_rqst *rqstp, in nfsd4_check_open_attributes() argument
138 status = check_attr_support(rqstp, cstate, in nfsd4_check_open_attributes()
141 status = check_attr_support(rqstp, cstate, in nfsd4_check_open_attributes()
162 do_set_nfs4_acl(struct svc_rqst *rqstp, struct svc_fh *fhp, in do_set_nfs4_acl() argument
167 status = nfsd4_set_nfs4_acl(rqstp, fhp, acl); in do_set_nfs4_acl()
188 do_open_permission(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open, int … in do_open_permission() argument
205 status = fh_verify(rqstp, current_fh, S_IFREG, accmode); in do_open_permission()
237 do_open_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_open *open… in do_open_lookup() argument
269 status = do_nfsd_create(rqstp, current_fh, open->op_fname.data, in do_open_lookup()
293 status = nfsd_lookup(rqstp, current_fh, in do_open_lookup()
302 do_set_nfs4_acl(rqstp, *resfh, open->op_acl, open->op_bmval); in do_open_lookup()
309 status = do_open_permission(rqstp, *resfh, open, accmode); in do_open_lookup()
316 do_open_fhandle(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_open *ope… in do_open_fhandle() argument
344 status = do_open_permission(rqstp, current_fh, open, accmode); in do_open_fhandle()
360 nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_open() argument
365 struct net *net = SVC_NET(rqstp); in nfsd4_open()
397 status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP); in nfsd4_open()
411 status = nfsd4_check_open_attributes(rqstp, cstate, open); in nfsd4_open()
427 status = do_open_lookup(rqstp, cstate, open, &resfh); in nfsd4_open()
439 status = do_open_fhandle(rqstp, cstate, open); in nfsd4_open()
461 status = nfsd4_process_open2(rqstp, resfh, open); in nfsd4_open()
482 static __be32 nfsd4_open_omfg(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct n… in nfsd4_open_omfg() argument
491 return nfsd4_open(rqstp, cstate, open); in nfsd4_open_omfg()
498 nfsd4_getfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_getfh() argument
509 nfsd4_putfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_putfh() argument
516 return fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_BYPASS_GSS); in nfsd4_putfh()
520 nfsd4_putrootfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_putrootfh() argument
526 status = exp_pseudoroot(rqstp, &cstate->current_fh); in nfsd4_putrootfh()
531 nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_restorefh() argument
546 nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_savefh() argument
564 nfsd4_access(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_access() argument
571 return nfsd_access(rqstp, &cstate->current_fh, &access->ac_resp_access, in nfsd4_access()
590 nfsd4_commit(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_commit() argument
593 gen_boot_verifier(&commit->co_verf, SVC_NET(rqstp)); in nfsd4_commit()
594 return nfsd_commit(rqstp, &cstate->current_fh, commit->co_offset, in nfsd4_commit()
599 nfsd4_create(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_create() argument
608 status = fh_verify(rqstp, &cstate->current_fh, S_IFDIR, in nfsd4_create()
613 status = check_attr_support(rqstp, cstate, create->cr_bmval, in nfsd4_create()
620 status = nfsd_symlink(rqstp, &cstate->current_fh, in nfsd4_create()
630 status = nfsd_create(rqstp, &cstate->current_fh, in nfsd4_create()
640 status = nfsd_create(rqstp, &cstate->current_fh, in nfsd4_create()
646 status = nfsd_create(rqstp, &cstate->current_fh, in nfsd4_create()
652 status = nfsd_create(rqstp, &cstate->current_fh, in nfsd4_create()
659 status = nfsd_create(rqstp, &cstate->current_fh, in nfsd4_create()
675 do_set_nfs4_acl(rqstp, &resfh, create->cr_acl, in nfsd4_create()
687 nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_getattr() argument
692 status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP); in nfsd4_getattr()
708 nfsd4_link(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_link() argument
715 status = nfsd_link(rqstp, &cstate->current_fh, in nfsd4_link()
722 static __be32 nfsd4_do_lookupp(struct svc_rqst *rqstp, struct svc_fh *fh) in nfsd4_do_lookupp() argument
728 ret = exp_pseudoroot(rqstp, &tmp_fh); in nfsd4_do_lookupp()
736 return nfsd_lookup(rqstp, fh, "..", 2, fh); in nfsd4_do_lookupp()
740 nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lookupp() argument
743 return nfsd4_do_lookupp(rqstp, &cstate->current_fh); in nfsd4_lookupp()
747 nfsd4_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_lookup() argument
750 return nfsd_lookup(rqstp, &cstate->current_fh, in nfsd4_lookup()
756 nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_read() argument
773 if (!nfsd4_last_compound_op(rqstp)) in nfsd4_read()
774 clear_bit(RQ_SPLICE_OK, &rqstp->rq_flags); in nfsd4_read()
777 status = nfs4_preprocess_stateid_op(rqstp, cstate, &read->rd_stateid, in nfsd4_read()
785 read->rd_rqstp = rqstp; in nfsd4_read()
791 nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_readdir() argument
810 readdir->rd_rqstp = rqstp; in nfsd4_readdir()
816 nfsd4_readlink(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_readlink() argument
819 readlink->rl_rqstp = rqstp; in nfsd4_readlink()
825 nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_remove() argument
830 if (opens_in_grace(SVC_NET(rqstp))) in nfsd4_remove()
832 status = nfsd_unlink(rqstp, &cstate->current_fh, 0, in nfsd4_remove()
842 nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_rename() argument
849 if (opens_in_grace(SVC_NET(rqstp)) && in nfsd4_rename()
852 status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname, in nfsd4_rename()
863 nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_secinfo() argument
872 err = fh_verify(rqstp, &cstate->current_fh, S_IFDIR, NFSD_MAY_EXEC); in nfsd4_secinfo()
875 err = nfsd_lookup_dentry(rqstp, &cstate->current_fh, in nfsd4_secinfo()
894 nfsd4_secinfo_no_name(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_secinfo_no_name() argument
903 err = nfsd4_do_lookupp(rqstp, &cstate->current_fh); in nfsd4_secinfo_no_name()
917 nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_setattr() argument
924 status = nfs4_preprocess_stateid_op(rqstp, cstate, in nfsd4_setattr()
936 status = check_attr_support(rqstp, cstate, setattr->sa_bmval, in nfsd4_setattr()
942 status = nfsd4_set_nfs4_acl(rqstp, &cstate->current_fh, in nfsd4_setattr()
947 status = nfsd4_set_nfs4_label(rqstp, &cstate->current_fh, in nfsd4_setattr()
951 status = nfsd_setattr(rqstp, &cstate->current_fh, &setattr->sa_iattr, in nfsd4_setattr()
977 nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_write() argument
989 status = nfs4_preprocess_stateid_op(rqstp, cstate, stateid, WR_STATE, in nfsd4_write()
998 gen_boot_verifier(&write->wr_verifier, SVC_NET(rqstp)); in nfsd4_write()
1000 nvecs = fill_in_write_vector(rqstp->rq_vec, write); in nfsd4_write()
1001 WARN_ON_ONCE(nvecs > ARRAY_SIZE(rqstp->rq_vec)); in nfsd4_write()
1003 status = nfsd_vfs_write(rqstp, &cstate->current_fh, filp, in nfsd4_write()
1004 write->wr_offset, rqstp->rq_vec, nvecs, &cnt, in nfsd4_write()
1014 nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_fallocate() argument
1020 status = nfs4_preprocess_stateid_op(rqstp, cstate, in nfsd4_fallocate()
1028 status = nfsd4_vfs_fallocate(rqstp, &cstate->current_fh, file, in nfsd4_fallocate()
1037 nfsd4_allocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_allocate() argument
1040 return nfsd4_fallocate(rqstp, cstate, fallocate, 0); in nfsd4_allocate()
1044 nfsd4_deallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_deallocate() argument
1047 return nfsd4_fallocate(rqstp, cstate, fallocate, in nfsd4_deallocate()
1052 nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_seek() argument
1059 status = nfs4_preprocess_stateid_op(rqstp, cstate, in nfsd4_seek()
1100 _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in _nfsd4_verify() argument
1107 status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP); in _nfsd4_verify()
1111 status = check_attr_support(rqstp, cstate, verify->ve_bmval, NULL); in _nfsd4_verify()
1134 rqstp, 0); in _nfsd4_verify()
1158 nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_nverify() argument
1163 status = _nfsd4_verify(rqstp, cstate, verify); in nfsd4_nverify()
1168 nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, in nfsd4_verify() argument
1173 status = _nfsd4_verify(rqstp, cstate, verify); in nfsd4_verify()
1196 nfsd4_getdeviceinfo(struct svc_rqst *rqstp, in nfsd4_getdeviceinfo() argument
1218 exp = rqst_exp_find(rqstp, map->fsid_type, map->fsid); in nfsd4_getdeviceinfo()
1240 nfsd4_layoutget(struct svc_rqst *rqstp, in nfsd4_layoutget() argument
1264 nfserr = fh_verify(rqstp, current_fh, 0, accmode); in nfsd4_layoutget()
1294 nfserr = nfsd4_preprocess_layout_stateid(rqstp, cstate, &lgp->lg_sid, in nfsd4_layoutget()
1320 nfsd4_layoutcommit(struct svc_rqst *rqstp, in nfsd4_layoutcommit() argument
1332 nfserr = fh_verify(rqstp, current_fh, 0, NFSD_MAY_WRITE); in nfsd4_layoutcommit()
1356 nfserr = nfsd4_preprocess_layout_stateid(rqstp, cstate, &lcp->lc_sid, in nfsd4_layoutcommit()
1384 nfsd4_layoutreturn(struct svc_rqst *rqstp, in nfsd4_layoutreturn() argument
1391 nfserr = fh_verify(rqstp, current_fh, 0, NFSD_MAY_NOP); in nfsd4_layoutreturn()
1413 nfserr = nfsd4_return_file_layouts(rqstp, cstate, lrp); in nfsd4_layoutreturn()
1417 nfserr = nfsd4_return_client_layouts(rqstp, cstate, lrp); in nfsd4_layoutreturn()
1434 nfsd4_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) in nfsd4_proc_null() argument
1540 static bool need_wrongsec_check(struct svc_rqst *rqstp) in need_wrongsec_check() argument
1542 struct nfsd4_compoundres *resp = rqstp->rq_resp; in need_wrongsec_check()
1543 struct nfsd4_compoundargs *argp = rqstp->rq_argp; in need_wrongsec_check()
1574 static void svcxdr_init_encode(struct svc_rqst *rqstp, in svcxdr_init_encode() argument
1578 struct xdr_buf *buf = &rqstp->rq_res; in svcxdr_init_encode()
1584 xdr->end = head->iov_base + PAGE_SIZE - rqstp->rq_auth_slack; in svcxdr_init_encode()
1589 buf->buflen = PAGE_SIZE * (1 + rqstp->rq_page_end - buf->pages) in svcxdr_init_encode()
1590 - rqstp->rq_auth_slack; in svcxdr_init_encode()
1597 nfsd4_proc_compound(struct svc_rqst *rqstp, in nfsd4_proc_compound() argument
1608 svcxdr_init_encode(rqstp, resp); in nfsd4_proc_compound()
1614 resp->rqstp = rqstp; in nfsd4_proc_compound()
1622 clear_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); in nfsd4_proc_compound()
1651 op->status = nfsd4_open_omfg(rqstp, cstate, op); in nfsd4_proc_compound()
1676 u32 plen = opdesc->op_rsize_bop(rqstp, op); in nfsd4_proc_compound()
1691 op->status = opdesc->op_func(rqstp, cstate, &op->u); in nfsd4_proc_compound()
1700 if (need_wrongsec_check(rqstp)) in nfsd4_proc_compound()
1701 op->status = check_nfsd_access(current_fh->fh_export, rqstp); in nfsd4_proc_compound()
1734 set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); in nfsd4_proc_compound()
1757 static inline u32 nfsd4_only_status_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_only_status_rsize() argument
1762 static inline u32 nfsd4_status_stateid_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_status_stateid_rsize() argument
1767 static inline u32 nfsd4_commit_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_commit_rsize() argument
1772 static inline u32 nfsd4_create_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_create_rsize() argument
1783 static inline u32 nfsd4_getattr_rsize(struct svc_rqst *rqstp, in nfsd4_getattr_rsize() argument
1791 return svc_max_payload(rqstp); in nfsd4_getattr_rsize()
1793 return svc_max_payload(rqstp); in nfsd4_getattr_rsize()
1821 static inline u32 nfsd4_link_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_link_rsize() argument
1827 static inline u32 nfsd4_lock_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_lock_rsize() argument
1833 static inline u32 nfsd4_open_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_open_rsize() argument
1841 static inline u32 nfsd4_read_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_read_rsize() argument
1845 maxcount = svc_max_payload(rqstp); in nfsd4_read_rsize()
1851 static inline u32 nfsd4_readdir_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_readdir_rsize() argument
1855 maxcount = svc_max_payload(rqstp); in nfsd4_readdir_rsize()
1862 static inline u32 nfsd4_remove_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_remove_rsize() argument
1868 static inline u32 nfsd4_rename_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_rename_rsize() argument
1874 static inline u32 nfsd4_sequence_rsize(struct svc_rqst *rqstp, in nfsd4_sequence_rsize() argument
1881 static inline u32 nfsd4_setattr_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_setattr_rsize() argument
1886 static inline u32 nfsd4_setclientid_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_setclientid_rsize() argument
1892 static inline u32 nfsd4_write_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_write_rsize() argument
1897 static inline u32 nfsd4_exchange_id_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_exchange_id_rsize() argument
1911 static inline u32 nfsd4_bind_conn_to_session_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_bind_conn_to_session_rsize() argument
1918 static inline u32 nfsd4_create_session_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_create_session_rsize() argument
1933 static inline u32 nfsd4_layoutget_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_layoutget_rsize() argument
1942 static inline u32 nfsd4_layoutcommit_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_layoutcommit_rsize() argument
1949 static inline u32 nfsd4_layoutreturn_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_layoutreturn_rsize() argument
2289 int nfsd4_max_reply(struct svc_rqst *rqstp, struct nfsd4_op *op) in nfsd4_max_reply() argument
2298 return estimator ? estimator(rqstp, op) : PAGE_SIZE; in nfsd4_max_reply()