diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 457f0e7ece74..afc04b9784a0 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -63,6 +63,9 @@ static const stateid_t zero_stateid = { | |||
63 | static const stateid_t currentstateid = { | 63 | static const stateid_t currentstateid = { |
64 | .si_generation = 1, | 64 | .si_generation = 1, |
65 | }; | 65 | }; |
66 | static const stateid_t close_stateid = { | ||
67 | .si_generation = 0xffffffffU, | ||
68 | }; | ||
66 | 69 | ||
67 | static u64 current_sessionid = 1; | 70 | static u64 current_sessionid = 1; |
68 | 71 | ||
@@ -5461,6 +5464,11 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
5461 | nfsd4_close_open_stateid(stp); | 5464 | nfsd4_close_open_stateid(stp); |
5462 | mutex_unlock(&stp->st_mutex); | 5465 | mutex_unlock(&stp->st_mutex); |
5463 | 5466 | ||
5467 | /* See RFC5661 sectionm 18.2.4 */ | ||
5468 | if (stp->st_stid.sc_client->cl_minorversion) | ||
5469 | memcpy(&close->cl_stateid, &close_stateid, | ||
5470 | sizeof(close->cl_stateid)); | ||
5471 | |||
5464 | /* put reference from nfs4_preprocess_seqid_op */ | 5472 | /* put reference from nfs4_preprocess_seqid_op */ |
5465 | nfs4_put_stid(&stp->st_stid); | 5473 | nfs4_put_stid(&stp->st_stid); |
5466 | out: | 5474 | out: |