From 98ad9b908d4d636fc90297e5842aa3256cd78c65 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Wed, 31 Aug 2011 15:47:21 -0400 Subject: [PATCH] --- yaml --- r: 267135 b: refs/heads/master c: 73997dc4183c580278ea8cb41c7a9655940801e0 h: refs/heads/master i: 267133: cfe86920d66b80fe0396a8c8fb6fe99692c2ef64 267131: 4e46fc59c83cfd07d712f86d5112a3d689d32617 267127: e28a0095e00a6d6f85fe4a51741d5793c627f725 267119: 4cbbb6def580dd15408402162b6948a33d94aea2 267103: bbf77b69e9a7c29537ba7a64c120b5f9be935f89 267071: bc4d8db97b5fa0501e4eca806bf0b05499424cbb 267007: 0a25e4a3b7753d7cbf354992ed0471f98d787382 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 9ad8018f63a1..dfa0df94d63b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 81b829655d418316f0707b3656b45cff7a1dbf12 +refs/heads/master: 73997dc4183c580278ea8cb41c7a9655940801e0 diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index 106e8fa63cdf..80af79ee5d51 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -250,7 +250,7 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_stateid *stp, struct svc_f dp->dl_stateid.si_boot = boot_time; dp->dl_stateid.si_stateownerid = current_delegid++; dp->dl_stateid.si_fileid = 0; - dp->dl_stateid.si_generation = 0; + dp->dl_stateid.si_generation = 1; fh_copy_shallow(&dp->dl_fh, ¤t_fh->fh_handle); dp->dl_time = 0; atomic_set(&dp->dl_count, 1); @@ -2291,6 +2291,7 @@ init_stateid(struct nfs4_stateid *stp, struct nfs4_file *fp, struct nfsd4_open * stp->st_stateid.si_boot = boot_time; stp->st_stateid.si_stateownerid = sop->so_id; stp->st_stateid.si_fileid = fp->fi_id; + /* note will be incremented before first return to client: */ stp->st_stateid.si_generation = 0; stp->st_access_bmap = 0; stp->st_deny_bmap = 0; @@ -2894,7 +2895,6 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf status = nfs4_upgrade_open(rqstp, fp, current_fh, stp, open); if (status) goto out; - update_stateid(&stp->st_stateid); } else { status = nfs4_new_open(rqstp, &stp, fp, current_fh, open); if (status) @@ -2905,9 +2905,8 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf release_open_stateid(stp); goto out; } - if (nfsd4_has_session(&resp->cstate)) - update_stateid(&stp->st_stateid); } + update_stateid(&stp->st_stateid); memcpy(&open->op_stateid, &stp->st_stateid, sizeof(stateid_t)); if (nfsd4_has_session(&resp->cstate)) @@ -3893,6 +3892,7 @@ alloc_init_lock_stateid(struct nfs4_stateowner *sop, struct nfs4_file *fp, struc stp->st_stateid.si_boot = boot_time; stp->st_stateid.si_stateownerid = sop->so_id; stp->st_stateid.si_fileid = fp->fi_id; + /* note will be incremented before first return to client: */ stp->st_stateid.si_generation = 0; stp->st_access_bmap = 0; stp->st_deny_bmap = open_stp->st_deny_bmap;