diff options
author | Jeff Layton <jlayton@poochiereds.net> | 2016-05-05 06:53:47 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-05-13 15:34:47 -0400 |
commit | 14b7f4a1edf15808cf52dc38277ffe1d84854839 (patch) | |
tree | b4fcfa64ff59ee0ed5f6ef01d7b828de534e3af9 /fs/nfsd/state.h | |
parent | 64c59a3726f2dfa71680f9f3c34359e10e3ed7ab (diff) |
nfsd: handle seqid wraparound in nfsd4_preprocess_layout_stateid
Move the existing static function to an inline helper, and call it.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r-- | fs/nfsd/state.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index c050c53036a6..986e51e5ceac 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h | |||
@@ -573,6 +573,11 @@ enum nfsd4_cb_op { | |||
573 | NFSPROC4_CLNT_CB_SEQUENCE, | 573 | NFSPROC4_CLNT_CB_SEQUENCE, |
574 | }; | 574 | }; |
575 | 575 | ||
576 | /* Returns true iff a is later than b: */ | ||
577 | static inline bool nfsd4_stateid_generation_after(stateid_t *a, stateid_t *b) | ||
578 | { | ||
579 | return (s32)(a->si_generation - b->si_generation) > 0; | ||
580 | } | ||
576 | 581 | ||
577 | struct nfsd4_compound_state; | 582 | struct nfsd4_compound_state; |
578 | struct nfsd_net; | 583 | struct nfsd_net; |