Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4384
b: refs/heads/master
c: 3751517
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jul 8, 2005
1 parent 8b12ad7 commit affbec9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0dd395dc76071a06eea39839cc946c1241af3650
refs/heads/master: 375151773125f56b7f6d798d914ea469256b330b
25 changes: 7 additions & 18 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,8 +1531,6 @@ nfsd4_process_open1(struct nfsd4_open *open)
status = nfs_ok;
renew_client(sop->so_client);
out:
if (status && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
status = nfserr_reclaim_bad;
return status;
}

Expand Down Expand Up @@ -1688,17 +1686,11 @@ nfs4_upgrade_open(struct svc_rqst *rqstp, struct svc_fh *cur_fh, struct nfs4_sta

/* decrement seqid on successful reclaim, it will be bumped in encode_open */
static void
nfs4_set_claim_prev(struct nfsd4_open *open, int *status)
nfs4_set_claim_prev(struct nfsd4_open *open)
{
if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) {
if (*status)
*status = nfserr_reclaim_bad;
else {
open->op_stateowner->so_confirmed = 1;
open->op_stateowner->so_client->cl_firststate = 1;
open->op_stateowner->so_seqid--;
}
}
open->op_stateowner->so_confirmed = 1;
open->op_stateowner->so_client->cl_firststate = 1;
open->op_stateowner->so_seqid--;
}

/*
Expand Down Expand Up @@ -1863,8 +1855,8 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
out:
if (fp)
put_nfs4_file(fp);
/* CLAIM_PREVIOUS has different error returns */
nfs4_set_claim_prev(open, &status);
if (status == 0 && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
nfs4_set_claim_prev(open);
/*
* To finish the open response, we just need to set the rflags.
*/
Expand Down Expand Up @@ -2738,11 +2730,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
CHECK_FH | OPEN_STATE,
&open_sop, &open_stp,
&lock->v.new.clientid);
if (status) {
if (lock->lk_reclaim)
status = nfserr_reclaim_bad;
if (status)
goto out;
}
/* create lockowner and lock stateid */
fp = open_stp->st_file;
strhashval = lock_ownerstr_hashval(fp->fi_inode,
Expand Down

0 comments on commit affbec9

Please sign in to comment.