We shouldn't check for replays until after checking whether the open owner
is confirmed. Clients are allowed to reuse openowners without bumping the
seqid.
Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Neil Brown <[email protected]>
### Diffstat output
./fs/nfsd/nfs4state.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff ./fs/nfsd/nfs4state.c~current~ ./fs/nfsd/nfs4state.c
--- ./fs/nfsd/nfs4state.c~current~ 2006-01-13 11:51:06.000000000 +1100
+++ ./fs/nfsd/nfs4state.c 2006-01-13 11:51:08.000000000 +1100
@@ -1465,8 +1465,16 @@ nfsd4_process_open1(struct nfsd4_open *o
sop = find_openstateowner_str(strhashval, open);
if (sop) {
open->op_stateowner = sop;
- /* check for replay */
- if (open->op_seqid == sop->so_seqid - 1){
+ if (!sop->so_confirmed) {
+ /* Replace any unconfirmed stateowner without
+ * even checking for replays */
+ clp = sop->so_client;
+ release_stateowner(sop);
+ } else if (open->op_seqid == sop->so_seqid) {
+ /* normal case */
+ goto renew;
+ } else if (open->op_seqid == sop->so_seqid - 1) {
+ /* replay */
if (sop->so_replay.rp_buflen)
return NFSERR_REPLAY_ME;
else {
@@ -1480,19 +1488,9 @@ nfsd4_process_open1(struct nfsd4_open *o
" replay with no replay cache\n");
goto renew;
}
- } else if (sop->so_confirmed) {
- if (open->op_seqid == sop->so_seqid)
- goto renew;
+ } else {
status = nfserr_bad_seqid;
goto out;
- } else {
- /* If we get here, we received an OPEN for an
- * unconfirmed nfs4_stateowner. Since the seqid's are
- * different, purge the existing nfs4_stateowner, and
- * instantiate a new one.
- */
- clp = sop->so_client;
- release_stateowner(sop);
}
} else {
/* nfs4_stateowner not found.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs