Return-Path: linux-nfs-owner@vger.kernel.org Received: from mail-ee0-f46.google.com ([74.125.83.46]:49290 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751799Ab2BEREv (ORCPT ); Sun, 5 Feb 2012 12:04:51 -0500 Received: by eekc14 with SMTP id c14so1892522eek.19 for ; Sun, 05 Feb 2012 09:04:50 -0800 (PST) From: Tigran Mkrtchyan To: linux-nfs@vger.kernel.org, bfields@fieldses.org Cc: Tigran Mkrtchyan Subject: [PATH v8 01/10] nfsd4: initialize current stateid at compile time Date: Sun, 5 Feb 2012 18:07:50 +0100 Message-Id: <1328461679-4108-2-git-send-email-tigran.mkrtchyan@desy.de> In-Reply-To: <1328461679-4108-1-git-send-email-tigran.mkrtchyan@desy.de> References: <1328461679-4108-1-git-send-email-tigran.mkrtchyan@desy.de> Sender: linux-nfs-owner@vger.kernel.org List-ID: From: Tigran Mkrtchyan Signed-off-by: Tigran Mkrtchyan --- fs/nfsd/nfs4state.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 7355fe4..8ca5ed1 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); -- 1.7.7.6