diff options
author | Tigran Mkrtchyan <kofemann@gmail.com> | 2012-02-13 16:55:23 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-02-15 11:20:29 -0500 |
commit | 19ff0f288c6f2100987408ecc2cb911a2d50bc76 (patch) | |
tree | 3967d906730f1c5a2980a232b3ed14d5e923746e | |
parent | bf5c43c8f155e755b0fc3dfa76f9f8c6e2c0161f (diff) |
nfsd4: initialize current stateid at compile time
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/nfsd/nfs4state.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 2387791ea050..905808bc94bb 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -58,11 +58,15 @@ static const stateid_t one_stateid = { | |||
58 | static const stateid_t zero_stateid = { | 58 | static const stateid_t zero_stateid = { |
59 | /* all fields zero */ | 59 | /* all fields zero */ |
60 | }; | 60 | }; |
61 | static const stateid_t currentstateid = { | ||
62 | .si_generation = 1, | ||
63 | }; | ||
61 | 64 | ||
62 | static u64 current_sessionid = 1; | 65 | static u64 current_sessionid = 1; |
63 | 66 | ||
64 | #define ZERO_STATEID(stateid) (!memcmp((stateid), &zero_stateid, sizeof(stateid_t))) | 67 | #define ZERO_STATEID(stateid) (!memcmp((stateid), &zero_stateid, sizeof(stateid_t))) |
65 | #define ONE_STATEID(stateid) (!memcmp((stateid), &one_stateid, sizeof(stateid_t))) | 68 | #define ONE_STATEID(stateid) (!memcmp((stateid), &one_stateid, sizeof(stateid_t))) |
69 | #define CURRENT_STATEID(stateid) (!memcmp((stateid), ¤tstateid, sizeof(stateid_t))) | ||
66 | 70 | ||
67 | /* forward declarations */ | 71 | /* forward declarations */ |
68 | static int check_for_locks(struct nfs4_file *filp, struct nfs4_lockowner *lowner); | 72 | static int check_for_locks(struct nfs4_file *filp, struct nfs4_lockowner *lowner); |