diff options
author | Tigran Mkrtchyan <kofemann@gmail.com> | 2012-02-13 22:55:23 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-02-15 11:20:29 -0500 |
commit | 19ff0f288c6f2100987408ecc2cb911a2d50bc76 (patch) | |
tree | 3967d906730f1c5a2980a232b3ed14d5e923746e /fs/nfsd | |
parent | bf5c43c8f155e755b0fc3dfa76f9f8c6e2c0161f (diff) | |
download | linux-19ff0f288c6f2100987408ecc2cb911a2d50bc76.tar.gz linux-19ff0f288c6f2100987408ecc2cb911a2d50bc76.tar.bz2 linux-19ff0f288c6f2100987408ecc2cb911a2d50bc76.zip |
nfsd4: initialize current stateid at compile time
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-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 = { static const stateid_t zero_stateid = { /* all fields zero */ }; +static const stateid_t currentstateid = { + .si_generation = 1, +}; static u64 current_sessionid = 1; #define ZERO_STATEID(stateid) (!memcmp((stateid), &zero_stateid, sizeof(stateid_t))) #define ONE_STATEID(stateid) (!memcmp((stateid), &one_stateid, sizeof(stateid_t))) +#define CURRENT_STATEID(stateid) (!memcmp((stateid), ¤tstateid, sizeof(stateid_t))) /* forward declarations */ static int check_for_locks(struct nfs4_file *filp, struct nfs4_lockowner *lowner); |