]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nfsd4: initialize current stateid at compile time
authorTigran Mkrtchyan <kofemann@gmail.com>
Mon, 13 Feb 2012 21:55:23 +0000 (22:55 +0100)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 15 Feb 2012 16:20:29 +0000 (11:20 -0500)
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 2387791ea0503188be8f200df96956d31f87caf2..905808bc94bbbe10667255184e96b147acd77dfa 100644 (file)
@@ -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), &currentstateid, sizeof(stateid_t)))
 
 /* forward declarations */
 static int check_for_locks(struct nfs4_file *filp, struct nfs4_lockowner *lowner);