• 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 defs:open

94 	struct nfsd4_compound_state *cstate, struct nfsd4_open *open)
98 if (open->op_create == NFS4_OPEN_CREATE) {
99 if (open->op_createmode == NFS4_CREATE_UNCHECKED
100 || open->op_createmode == NFS4_CREATE_GUARDED)
102 open->op_bmval, nfsd_attrmask);
103 else if (open->op_createmode == NFS4_CREATE_EXCLUSIVE4_1)
105 open->op_bmval, nfsd41_ex_attrmask);
112 is_create_with_attrs(struct nfsd4_open *open)
114 return open->op_create == NFS4_OPEN_CREATE
115 && (open->op_createmode == NFS4_CREATE_UNCHECKED
116 || open->op_createmode == NFS4_CREATE_GUARDED
117 || open->op_createmode == NFS4_CREATE_EXCLUSIVE4_1);
133 * We should probably fail the whole open at this point,
151 do_open_permission(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open, int accmode)
155 if (open->op_truncate &&
156 !(open->op_share_access & NFS4_SHARE_ACCESS_WRITE))
159 if (open->op_share_access & NFS4_SHARE_ACCESS_READ)
161 if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE)
163 if (open->op_share_deny & NFS4_SHARE_DENY_READ)
172 do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open)
179 open->op_truncate = 0;
181 if (open->op_create) {
187 status = nfsd_create_v3(rqstp, current_fh, open->op_fname.data,
188 open->op_fname.len, &open->op_iattr,
189 &resfh, open->op_createmode,
190 (u32 *)open->op_verf.data,
191 &open->op_truncate, &created);
198 if (open->op_createmode == NFS4_CREATE_EXCLUSIVE && status == 0)
199 open->op_bmval[1] = (FATTR4_WORD1_TIME_ACCESS |
203 open->op_fname.data, open->op_fname.len, &resfh);
209 if (is_create_with_attrs(open) && open->op_acl != NULL)
210 do_set_nfs4_acl(rqstp, &resfh, open->op_acl, open->op_bmval);
212 set_change_info(&open->op_cinfo, current_fh);
216 fh_copy_shallow(&open->op_stateowner->so_replay.rp_openfh,
219 status = do_open_permission(rqstp, current_fh, open,
228 do_open_fhandle(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open)
233 if ((status = nfs4_check_open_reclaim(&open->op_clientid)))
240 memset(&open->op_cinfo, 0, sizeof(struct nfsd4_change_info));
243 fh_copy_shallow(&open->op_stateowner->so_replay.rp_openfh,
246 open->op_truncate = (open->op_iattr.ia_valid & ATTR_SIZE) &&
247 (open->op_iattr.ia_size == 0);
249 status = do_open_permission(rqstp, current_fh, open,
267 struct nfsd4_open *open)
273 (int)open->op_fname.len, open->op_fname.data,
274 open->op_stateowner);
277 if (open->op_create && open->op_claim_type != NFS4_OPEN_CLAIM_NULL)
281 copy_clientid(&open->op_clientid, cstate->session);
287 status = nfsd4_process_open1(&resp->cstate, open);
289 struct nfs4_replay *rp = &open->op_stateowner->so_replay;
303 status = nfsd4_check_open_attributes(rqstp, cstate, open);
310 if (locks_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
313 if (!locks_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
316 switch (open->op_claim_type) {
321 * creating it if necessary, (2) set open->op_cinfo,
322 * (3) set open->op_truncate if the file is to be
326 open);
331 open->op_stateowner->so_confirmed = 1;
334 * opened. (1) set open->op_cinfo, (2) set
335 * open->op_truncate if the file is to be truncated
339 open);
344 open->op_stateowner->so_confirmed = 1;
346 open->op_claim_type);
351 open->op_claim_type);
357 * successful, it (1) truncates the file if open->op_truncate was
358 * set, (2) sets open->op_stateid, (3) sets open->op_delegation.
360 status = nfsd4_process_open2(rqstp, &cstate->current_fh, open);
362 if (open->op_stateowner) {
363 nfs4_get_stateowner(open->op_stateowner);
364 cstate->replay_owner = open->op_stateowner;