Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297444
b: refs/heads/master
c: 1255a8f
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Mar 6, 2012
1 parent c2d4fd8 commit 3364bad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: d24433cdc91c0ed15938d2a6ee9e3e1b00fcfaa3
refs/heads/master: 1255a8f36cb16a02540bdad91c0bc0971b9fb429
11 changes: 8 additions & 3 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2778,10 +2778,15 @@ nfs4_upgrade_open(struct svc_rqst *rqstp, struct nfs4_file *fp, struct svc_fh *c


static void
nfs4_set_claim_prev(struct nfsd4_open *open)
nfs4_set_claim_prev(struct nfsd4_open *open, bool has_session)
{
open->op_openowner->oo_flags |= NFS4_OO_CONFIRMED;
open->op_openowner->oo_owner.so_client->cl_firststate = 1;
/*
* On a 4.1+ client, we don't create a state record for a client
* until it performs RECLAIM_COMPLETE:
*/
if (!has_session)
open->op_openowner->oo_owner.so_client->cl_firststate = 1;
}

/* Should we give out recallable state?: */
Expand Down Expand Up @@ -3044,7 +3049,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
if (fp)
put_nfs4_file(fp);
if (status == 0 && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
nfs4_set_claim_prev(open);
nfs4_set_claim_prev(open, nfsd4_has_session(&resp->cstate));
/*
* To finish the open response, we just need to set the rflags.
*/
Expand Down

0 comments on commit 3364bad

Please sign in to comment.