diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-08-23 11:03:29 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-08-31 17:56:00 -0400 |
commit | 81b829655d418316f0707b3656b45cff7a1dbf12 (patch) | |
tree | dfd373c283c89514898cd1147969c4fffb2485a2 /fs/nfsd/state.h | |
parent | b79abaddfe7ef29e00d71721cf03a33e00d53317 (diff) |
nfsd4: simplify stateid generation code, fix wraparound
Follow the recommendation from rfc3530bis for stateid generation number
wraparound, simplify some code, and fix or remove incorrect comments.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r-- | fs/nfsd/state.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index a06f55bd38b6..c425717715f6 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h | |||
@@ -293,6 +293,9 @@ static inline void | |||
293 | update_stateid(stateid_t *stateid) | 293 | update_stateid(stateid_t *stateid) |
294 | { | 294 | { |
295 | stateid->si_generation++; | 295 | stateid->si_generation++; |
296 | /* Wraparound recommendation from 3530bis-13 9.1.3.2: */ | ||
297 | if (stateid->si_generation == 0) | ||
298 | stateid->si_generation = 1; | ||
296 | } | 299 | } |
297 | 300 | ||
298 | /* A reasonable value for REPLAY_ISIZE was estimated as follows: | 301 | /* A reasonable value for REPLAY_ISIZE was estimated as follows: |