• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/nfsd/

Lines Matching refs:cstate

57 check_attr_support(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
60 struct dentry *dentry = cstate->current_fh.fh_dentry;
66 if ((bmval[0] & ~nfsd_suppattrs0(cstate->minorversion)) ||
67 (bmval[1] & ~nfsd_suppattrs1(cstate->minorversion)) ||
68 (bmval[2] & ~nfsd_suppattrs2(cstate->minorversion)))
94 struct nfsd4_compound_state *cstate, struct nfsd4_open *open)
101 status = check_attr_support(rqstp, cstate,
104 status = check_attr_support(rqstp, cstate,
266 nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
280 if (nfsd4_has_session(cstate))
281 copy_clientid(&open->op_clientid, cstate->session);
287 status = nfsd4_process_open1(&resp->cstate, open);
290 fh_put(&cstate->current_fh);
291 fh_copy_shallow(&cstate->current_fh.fh_handle,
293 status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP);
303 status = nfsd4_check_open_attributes(rqstp, cstate, open);
325 status = do_open_lookup(rqstp, &cstate->current_fh,
338 status = do_open_fhandle(rqstp, &cstate->current_fh,
360 status = nfsd4_process_open2(rqstp, &cstate->current_fh, open);
364 cstate->replay_owner = open->op_stateowner;
374 nfsd4_getfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
377 if (!cstate->current_fh.fh_dentry)
380 *getfh = &cstate->current_fh;
385 nfsd4_putfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
388 fh_put(&cstate->current_fh);
389 cstate->current_fh.fh_handle.fh_size = putfh->pf_fhlen;
390 memcpy(&cstate->current_fh.fh_handle.fh_base, putfh->pf_fhval,
392 return fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP);
396 nfsd4_putrootfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
401 fh_put(&cstate->current_fh);
402 status = exp_pseudoroot(rqstp, &cstate->current_fh);
407 nfsd4_restorefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
410 if (!cstate->save_fh.fh_dentry)
413 fh_dup2(&cstate->current_fh, &cstate->save_fh);
418 nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
421 if (!cstate->current_fh.fh_dentry)
424 fh_dup2(&cstate->save_fh, &cstate->current_fh);
432 nfsd4_access(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
439 return nfsd_access(rqstp, &cstate->current_fh, &access->ac_resp_access,
444 nfsd4_commit(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
453 status = nfsd_commit(rqstp, &cstate->current_fh, commit->co_offset,
461 nfsd4_create(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
470 status = fh_verify(rqstp, &cstate->current_fh, S_IFDIR,
477 status = check_attr_support(rqstp, cstate, create->cr_bmval,
493 status = nfsd_symlink(rqstp, &cstate->current_fh,
504 status = nfsd_create(rqstp, &cstate->current_fh,
514 status = nfsd_create(rqstp, &cstate->current_fh,
520 status = nfsd_create(rqstp, &cstate->current_fh,
526 status = nfsd_create(rqstp, &cstate->current_fh,
533 status = nfsd_create(rqstp, &cstate->current_fh,
549 fh_unlock(&cstate->current_fh);
550 set_change_info(&create->cr_cinfo, &cstate->current_fh);
551 fh_dup2(&cstate->current_fh, &resfh);
558 nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
563 status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP);
570 getattr->ga_bmval[0] &= nfsd_suppattrs0(cstate->minorversion);
571 getattr->ga_bmval[1] &= nfsd_suppattrs1(cstate->minorversion);
572 getattr->ga_bmval[2] &= nfsd_suppattrs2(cstate->minorversion);
574 getattr->ga_fhp = &cstate->current_fh;
579 nfsd4_link(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
584 if (!cstate->save_fh.fh_dentry)
586 status = nfsd_link(rqstp, &cstate->current_fh,
587 link->li_name, link->li_namelen, &cstate->save_fh);
589 set_change_info(&link->li_cinfo, &cstate->current_fh);
594 nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
604 if (tmp_fh.fh_dentry == cstate->current_fh.fh_dentry) {
609 return nfsd_lookup(rqstp, &cstate->current_fh,
610 "..", 2, &cstate->current_fh);
614 nfsd4_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
617 return nfsd_lookup(rqstp, &cstate->current_fh,
619 &cstate->current_fh);
623 nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
636 if ((status = nfs4_preprocess_stateid_op(cstate, &read->rd_stateid,
647 read->rd_fhp = &cstate->current_fh;
652 nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
663 readdir->rd_bmval[0] &= nfsd_suppattrs0(cstate->minorversion);
664 readdir->rd_bmval[1] &= nfsd_suppattrs1(cstate->minorversion);
665 readdir->rd_bmval[2] &= nfsd_suppattrs2(cstate->minorversion);
672 readdir->rd_fhp = &cstate->current_fh;
677 nfsd4_readlink(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
681 readlink->rl_fhp = &cstate->current_fh;
686 nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
693 status = nfsd_unlink(rqstp, &cstate->current_fh, 0,
698 fh_unlock(&cstate->current_fh);
699 set_change_info(&remove->rm_cinfo, &cstate->current_fh);
705 nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
710 if (!cstate->save_fh.fh_dentry)
712 if (locks_in_grace() && !(cstate->save_fh.fh_export->ex_flags
715 status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname,
716 rename->rn_snamelen, &cstate->current_fh,
724 (S_ISDIR(cstate->save_fh.fh_dentry->d_inode->i_mode) &&
725 S_ISDIR(cstate->current_fh.fh_dentry->d_inode->i_mode)))
731 set_change_info(&rename->rn_sinfo, &cstate->current_fh);
732 set_change_info(&rename->rn_tinfo, &cstate->save_fh);
738 nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
747 err = nfsd_lookup_dentry(rqstp, &cstate->current_fh,
762 nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
769 status = nfs4_preprocess_stateid_op(cstate,
777 status = mnt_want_write(cstate->current_fh.fh_export->ex_path.mnt);
782 status = check_attr_support(rqstp, cstate, setattr->sa_bmval,
788 status = nfsd4_set_nfs4_acl(rqstp, &cstate->current_fh,
792 status = nfsd_setattr(rqstp, &cstate->current_fh, &setattr->sa_iattr,
795 mnt_drop_write(cstate->current_fh.fh_export->ex_path.mnt);
800 nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
815 status = nfs4_preprocess_stateid_op(cstate, stateid, WR_STATE, &filp);
831 status = nfsd_write(rqstp, &cstate->current_fh, filp,
850 _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
857 status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP);
861 status = check_attr_support(rqstp, cstate, verify->ve_bmval, NULL);
879 status = nfsd4_encode_fattr(&cstate->current_fh,
880 cstate->current_fh.fh_export,
881 cstate->current_fh.fh_dentry, buf,
905 nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
910 status = _nfsd4_verify(rqstp, cstate, verify);
915 nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
920 status = _nfsd4_verify(rqstp, cstate, verify);
1000 struct nfsd4_compound_state *cstate = &resp->cstate;
1015 resp->cstate.minorversion = args->minorversion;
1016 resp->cstate.replay_owner = NULL;
1017 resp->cstate.session = NULL;
1018 fh_init(&resp->cstate.current_fh, NFS4_FHSIZE);
1019 fh_init(&resp->cstate.save_fh, NFS4_FHSIZE);
1066 if (!cstate->current_fh.fh_dentry) {
1071 } else if (cstate->current_fh.fh_export->ex_fslocs.migrated &&
1078 op->status = opdesc->op_func(rqstp, cstate, &op->u);
1084 if (resp->cstate.status == nfserr_replay_cache) {
1090 op->replay = &cstate->replay_owner->so_replay;
1102 if (cstate->replay_owner) {
1103 nfs4_put_stateowner(cstate->replay_owner);
1104 cstate->replay_owner = NULL;
1116 resp->cstate.status = status;
1117 fh_put(&resp->cstate.current_fh);
1118 fh_put(&resp->cstate.save_fh);
1119 BUG_ON(resp->cstate.replay_owner);