• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/nfsd/

Lines Matching defs:cstate

158 nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
176 fh_put(&cstate->current_fh);
177 cstate->current_fh.fh_handle.fh_size = rp->rp_openfh_len;
178 memcpy(&cstate->current_fh.fh_handle.fh_base, rp->rp_openfh,
180 status = fh_verify(rqstp, &cstate->current_fh, 0, MAY_NOP);
212 status = do_open_lookup(rqstp, &cstate->current_fh,
225 status = do_open_fhandle(rqstp, &cstate->current_fh,
247 status = nfsd4_process_open2(rqstp, &cstate->current_fh, open);
251 cstate->replay_owner = open->op_stateowner;
261 nfsd4_getfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
264 if (!cstate->current_fh.fh_dentry)
267 *getfh = &cstate->current_fh;
272 nfsd4_putfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
275 fh_put(&cstate->current_fh);
276 cstate->current_fh.fh_handle.fh_size = putfh->pf_fhlen;
277 memcpy(&cstate->current_fh.fh_handle.fh_base, putfh->pf_fhval,
279 return fh_verify(rqstp, &cstate->current_fh, 0, MAY_NOP);
283 nfsd4_putrootfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
288 fh_put(&cstate->current_fh);
289 status = exp_pseudoroot(rqstp->rq_client, &cstate->current_fh,
295 nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
298 if (!cstate->save_fh.fh_dentry)
301 fh_dup2(&cstate->current_fh, &cstate->save_fh);
306 nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
309 if (!cstate->current_fh.fh_dentry)
312 fh_dup2(&cstate->save_fh, &cstate->current_fh);
320 nfsd4_access(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
327 return nfsd_access(rqstp, &cstate->current_fh, &access->ac_resp_access,
332 nfsd4_commit(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
341 status = nfsd_commit(rqstp, &cstate->current_fh, commit->co_offset,
349 nfsd4_create(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
358 status = fh_verify(rqstp, &cstate->current_fh, S_IFDIR, MAY_CREATE);
375 status = nfsd_symlink(rqstp, &cstate->current_fh,
386 status = nfsd_create(rqstp, &cstate->current_fh,
396 status = nfsd_create(rqstp, &cstate->current_fh,
402 status = nfsd_create(rqstp, &cstate->current_fh,
408 status = nfsd_create(rqstp, &cstate->current_fh,
415 status = nfsd_create(rqstp, &cstate->current_fh,
425 fh_unlock(&cstate->current_fh);
426 set_change_info(&create->cr_cinfo, &cstate->current_fh);
427 fh_dup2(&cstate->current_fh, &resfh);
435 nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
440 status = fh_verify(rqstp, &cstate->current_fh, 0, MAY_NOP);
450 getattr->ga_fhp = &cstate->current_fh;
455 nfsd4_link(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
460 if (!cstate->save_fh.fh_dentry)
462 status = nfsd_link(rqstp, &cstate->current_fh,
463 link->li_name, link->li_namelen, &cstate->save_fh);
465 set_change_info(&link->li_cinfo, &cstate->current_fh);
470 nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
480 if (tmp_fh.fh_dentry == cstate->current_fh.fh_dentry) {
485 return nfsd_lookup(rqstp, &cstate->current_fh,
486 "..", 2, &cstate->current_fh);
490 nfsd4_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
493 return nfsd_lookup(rqstp, &cstate->current_fh,
495 &cstate->current_fh);
499 nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
512 if ((status = nfs4_preprocess_stateid_op(&cstate->current_fh,
524 read->rd_fhp = &cstate->current_fh;
529 nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
548 readdir->rd_fhp = &cstate->current_fh;
553 nfsd4_readlink(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
557 readlink->rl_fhp = &cstate->current_fh;
562 nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
569 status = nfsd_unlink(rqstp, &cstate->current_fh, 0,
574 fh_unlock(&cstate->current_fh);
575 set_change_info(&remove->rm_cinfo, &cstate->current_fh);
581 nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
586 if (!cstate->save_fh.fh_dentry)
588 if (nfs4_in_grace() && !(cstate->save_fh.fh_export->ex_flags
591 status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname,
592 rename->rn_snamelen, &cstate->current_fh,
600 (S_ISDIR(cstate->save_fh.fh_dentry->d_inode->i_mode) &&
601 S_ISDIR(cstate->current_fh.fh_dentry->d_inode->i_mode)))
607 set_change_info(&rename->rn_sinfo, &cstate->current_fh);
608 set_change_info(&rename->rn_tinfo, &cstate->save_fh);
614 nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
621 status = nfs4_preprocess_stateid_op(&cstate->current_fh,
631 status = nfsd4_set_nfs4_acl(rqstp, &cstate->current_fh,
635 status = nfsd_setattr(rqstp, &cstate->current_fh, &setattr->sa_iattr,
641 nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
655 status = nfs4_preprocess_stateid_op(&cstate->current_fh, stateid,
672 status = nfsd_write(rqstp, &cstate->current_fh, filp,
689 _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
696 status = fh_verify(rqstp, &cstate->current_fh, 0, MAY_NOP);
717 status = nfsd4_encode_fattr(&cstate->current_fh,
718 cstate->current_fh.fh_export,
719 cstate->current_fh.fh_dentry, buf,
742 nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
747 status = _nfsd4_verify(rqstp, cstate, verify);
752 nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
757 status = _nfsd4_verify(rqstp, cstate, verify);
776 static void cstate_free(struct nfsd4_compound_state *cstate)
778 if (cstate == NULL)
780 fh_put(&cstate->current_fh);
781 fh_put(&cstate->save_fh);
782 BUG_ON(cstate->replay_owner);
783 kfree(cstate);
788 struct nfsd4_compound_state *cstate;
790 cstate = kmalloc(sizeof(struct nfsd4_compound_state), GFP_KERNEL);
791 if (cstate == NULL)
793 fh_init(&cstate->current_fh, NFS4_FHSIZE);
794 fh_init(&cstate->save_fh, NFS4_FHSIZE);
795 cstate->replay_owner = NULL;
796 return cstate;
823 struct nfsd4_compound_state *cstate = NULL;
828 cstate = cstate_alloc();
829 if (cstate == NULL)
879 if (!cstate->current_fh.fh_dentry) {
884 } else if (cstate->current_fh.fh_export->ex_fslocs.migrated &&
891 op->status = opdesc->op_func(rqstp, cstate, &op->u);
897 op->replay = &cstate->replay_owner->so_replay;
904 if (cstate->replay_owner) {
905 nfs4_put_stateowner(cstate->replay_owner);
906 cstate->replay_owner = NULL;
916 cstate_free(cstate);