mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
nfsd4: initialize current stateid at compile time
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
bf5c43c8f1
commit
19ff0f288c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user