OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c900ee9
)
nfsd: CLOSE SHOULD return the invalid special stateid for NFSv4.x (x>0)
author
Trond Myklebust
<trond.myklebust@primarydata.com>
Fri, 3 Nov 2017 12:00:12 +0000
(08:00 -0400)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:39:07 +0000
(17:39 +0100)
[ Upstream commit
fb500a7cfee7f2f447d2bbf30cb59629feab6ac1
]
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4state.c
patch
|
blob
|
history
diff --git
a/fs/nfsd/nfs4state.c
b/fs/nfsd/nfs4state.c
index
a439a70
..
61f3834
100644
(file)
--- a/
fs/nfsd/nfs4state.c
+++ b/
fs/nfsd/nfs4state.c
@@
-63,6
+63,9
@@
static const stateid_t zero_stateid = {
static const stateid_t currentstateid = {
.si_generation = 1,
};
+static const stateid_t close_stateid = {
+ .si_generation = 0xffffffffU,
+};
static u64 current_sessionid = 1;
@@
-5411,6
+5414,11
@@
nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
nfsd4_close_open_stateid(stp);
mutex_unlock(&stp->st_mutex);
+ /* See RFC5661 sectionm 18.2.4 */
+ if (stp->st_stid.sc_client->cl_minorversion)
+ memcpy(&close->cl_stateid, &close_stateid,
+ sizeof(close->cl_stateid));
+
/* put reference from nfs4_preprocess_seqid_op */
nfs4_put_stid(&stp->st_stid);
out: