From: Tigran Mkrtchyan Date: Mon, 13 Feb 2012 21:55:23 +0000 (+0100) Subject: nfsd4: initialize current stateid at compile time X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19ff0f288c6f2100987408ecc2cb911a2d50bc76;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nfsd4: initialize current stateid at compile time Signed-off-by: Tigran Mkrtchyan Signed-off-by: J. Bruce Fields --- 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);