Lines Matching defs:rqstp
1760 static struct nfsd4_conn *alloc_conn(struct svc_rqst *rqstp, u32 flags)
1767 svc_xprt_get(rqstp->rq_xprt);
1768 conn->cn_xprt = rqstp->rq_xprt;
1795 static void nfsd4_init_conn(struct svc_rqst *rqstp, struct nfsd4_conn *conn, struct nfsd4_session *ses)
1808 static struct nfsd4_conn *alloc_conn_from_crses(struct svc_rqst *rqstp, struct nfsd4_create_session *cses)
1814 return alloc_conn(rqstp, dir);
1850 static void init_session(struct svc_rqst *rqstp, struct nfsd4_session *new, struct nfs4_client *clp, struct nfsd4_create_session *cses)
1853 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
1872 struct sockaddr *sa = svc_addr(rqstp);
2267 static bool svc_rqst_integrity_protected(struct svc_rqst *rqstp)
2269 struct svc_cred *cr = &rqstp->rq_cred;
2279 bool nfsd4_mach_creds_match(struct nfs4_client *cl, struct svc_rqst *rqstp)
2281 struct svc_cred *cr = &rqstp->rq_cred;
2287 if (!svc_rqst_integrity_protected(rqstp))
2720 struct svc_rqst *rqstp, nfs4_verifier *verf)
2723 struct sockaddr *sa = svc_addr(rqstp);
2725 struct net *net = SVC_NET(rqstp);
2732 ret = copy_cred(&clp->cl_cred, &rqstp->rq_cred);
2882 gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se, struct svc_rqst *rqstp)
2885 struct sockaddr *sa = svc_addr(rqstp);
2912 memcpy(&conn->cb_saddr, &rqstp->rq_daddr, rqstp->rq_daddrlen);
2938 copy_cred(&slot->sl_cred, &resp->rqstp->rq_cred);
3004 status = nfsd4_enc_sequence_replay(resp->rqstp->rq_argp, resp);
3077 nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
3086 struct sockaddr *sa = svc_addr(rqstp);
3088 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
3091 dprintk("%s rqstp=%p exid=%p clname.len=%u clname.data=%p "
3093 __func__, rqstp, exid, exid->clname.len, exid->clname.data,
3099 new = create_client(exid->clname, rqstp, &verf);
3124 if (!svc_rqst_integrity_protected(rqstp)) {
3153 bool creds_match = same_creds(&conf->cl_cred, &rqstp->rq_cred);
3161 if (!nfsd4_mach_creds_match(conf, rqstp)) {
3375 nfsd4_create_session(struct svc_rqst *rqstp,
3379 struct sockaddr *sa = svc_addr(rqstp);
3386 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
3403 conn = alloc_conn_from_crses(rqstp, cr_ses);
3414 if (!nfsd4_mach_creds_match(conf, rqstp))
3424 if (!same_creds(&unconf->cl_cred, &rqstp->rq_cred) ||
3430 if (!nfsd4_mach_creds_match(unconf, rqstp))
3459 init_session(rqstp, new, conf, cr_ses);
3471 nfsd4_init_conn(rqstp, conn, new);
3502 __be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp,
3508 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
3565 __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp,
3573 struct net *net = SVC_NET(rqstp);
3576 if (!nfsd4_last_compound_op(rqstp))
3584 if (!nfsd4_mach_creds_match(session->se_client, rqstp))
3586 status = nfsd4_match_existing_connection(rqstp, session,
3600 conn = alloc_conn(rqstp, bcts->dir);
3604 nfsd4_init_conn(rqstp, conn, session);
3689 static bool nfsd4_session_too_many_ops(struct svc_rqst *rqstp, struct nfsd4_session *session)
3691 struct nfsd4_compoundargs *args = rqstp->rq_argp;
3696 static bool nfsd4_request_too_big(struct svc_rqst *rqstp,
3699 struct xdr_buf *xb = &rqstp->rq_arg;
3704 static bool replay_matches_cache(struct svc_rqst *rqstp,
3707 struct nfsd4_compoundargs *argp = rqstp->rq_argp;
3726 if (!same_creds(&rqstp->rq_cred, &slot->sl_cred))
3738 nfsd4_sequence(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
3742 struct nfsd4_compoundres *resp = rqstp->rq_resp;
3750 struct net *net = SVC_NET(rqstp);
3760 conn = alloc_conn(rqstp, NFS4_CDFC4_FORE);
3771 if (nfsd4_session_too_many_ops(rqstp, session))
3775 if (nfsd4_request_too_big(rqstp, session))
3797 if (!replay_matches_cache(rqstp, seq, slot))
3821 if (xdr_restrict_buflen(xdr, buflen - rqstp->rq_auth_slack))
3823 svc_reserve(rqstp, buflen);
3878 nfsd4_destroy_clientid(struct svc_rqst *rqstp,
3886 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
3908 if (!nfsd4_mach_creds_match(clp, rqstp)) {
3922 nfsd4_reclaim_complete(struct svc_rqst *rqstp,
3962 nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
3971 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
3973 new = create_client(clname, rqstp, &clverifier);
3984 if (!same_creds(&conf->cl_cred, &rqstp->rq_cred)) {
3998 gen_callback(new, setclid, rqstp);
4016 nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
4027 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
4043 if (unconf && !same_creds(&unconf->cl_cred, &rqstp->rq_cred))
4045 if (conf && !same_creds(&conf->cl_cred, &rqstp->rq_cred))
4852 nfsd4_truncate(struct svc_rqst *rqstp, struct svc_fh *fh,
4863 return nfsd_setattr(rqstp, fh, &iattr, 0, (time64_t)0);
4866 static __be32 nfs4_get_vfs_file(struct svc_rqst *rqstp, struct nfs4_file *fp,
4906 status = nfsd_file_acquire(rqstp, cur_fh, access, &nf);
4924 status = nfsd4_truncate(rqstp, cur_fh, open);
4937 nfs4_upgrade_open(struct svc_rqst *rqstp, struct nfs4_file *fp, struct svc_fh *cur_fh, struct nfs4_ol_stateid *stp, struct nfsd4_open *open)
4943 return nfs4_get_vfs_file(rqstp, fp, cur_fh, stp, open);
4958 status = nfsd4_truncate(rqstp, cur_fh, open);
5190 nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open)
5192 struct nfsd4_compoundres *resp = rqstp->rq_resp;
5232 status = nfs4_upgrade_open(rqstp, fp, current_fh, stp, open);
5238 status = nfs4_get_vfs_file(rqstp, fp, current_fh, stp, open);
5316 nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
5322 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
5764 nfs4_check_file(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfs4_stid *s,
5773 status = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry,
5780 status = nfsd_file_acquire(rqstp, fhp, acc, &nf);
5872 nfs4_preprocess_stateid_op(struct svc_rqst *rqstp,
5878 struct net *net = SVC_NET(rqstp);
5924 status = nfs4_check_file(rqstp, fhp, s, nfp, flags);
5939 nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
5983 nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
6110 nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
6117 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
6122 status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0);
6177 nfsd4_open_downgrade(struct svc_rqst *rqstp,
6183 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
6249 nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
6255 struct net *net = SVC_NET(rqstp);
6298 nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
6306 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
6308 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0)))
6683 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
6702 struct net *net = SVC_NET(rqstp);
6712 if ((status = fh_verify(rqstp, &cstate->current_fh,
6903 static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock)
6908 err = nfsd_file_acquire(rqstp, fhp, NFSD_MAY_READ, &nf);
6929 nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
6936 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
6938 if (locks_in_grace(SVC_NET(rqstp)))
6951 if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0)))
6987 status = nfsd_test_lock(rqstp, &cstate->current_fh, file_lock);
7004 nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
7013 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
7111 nfsd4_release_lockowner(struct svc_rqst *rqstp,
7123 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);