Skip to content

Commit

Permalink
nfsd4: store correct client minorversion for >=4.2
Browse files Browse the repository at this point in the history
This code assumes that any client using exchange_id is using NFSv4.1,
but with the introduction of 4.2 that will no longer true.

This main effect of this is that client callbacks will use the same
minorversion as that used on the exchange_id.

Note that clients are forbidden from mixing 4.1 and 4.2 compounds.  (See
rfc 5661, section 2.7, #13: "A client MUST NOT attempt to use a stateid,
filehandle, or similar returned object from the COMPOUND procedure with
minor version X for another COMPOUND procedure with minor version Y,
where X != Y.")  However, we do not currently attempt to enforce this
except in the case of mixing zero minor version with non-zero minor
versions.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed May 13, 2013
1 parent eb48241 commit 4f540e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
status = nfserr_jukebox;
goto out;
}
new->cl_minorversion = 1;
new->cl_minorversion = cstate->minorversion;

gen_clid(new, nn);
add_to_unconfirmed(new);
Expand Down

0 comments on commit 4f540e2

Please sign in to comment.