NFSv4: Further clean-ups of delegation stateid validation
Change the name to reflect what we're really doing: testing two stateids for whether or not they match according the the rules in RFC3530 and RFC5661. Move the code from callback_proc.c to nfs4proc.c Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -98,14 +98,6 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
int nfs4_validate_delegation_stateid(struct nfs_delegation *delegation, const nfs4_stateid *stateid)
|
||||
{
|
||||
if (delegation == NULL || memcmp(delegation->stateid.data, stateid->data,
|
||||
sizeof(delegation->stateid.data)) != 0)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
|
||||
/*
|
||||
@@ -319,22 +311,6 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, const nfs4_stateid *stateid)
|
||||
{
|
||||
if (delegation == NULL)
|
||||
return 0;
|
||||
|
||||
if (stateid->stateid.seqid != 0 &&
|
||||
stateid->stateid.seqid != delegation->stateid.stateid.seqid)
|
||||
return 0;
|
||||
if (memcmp(delegation->stateid.stateid.other,
|
||||
stateid->stateid.other,
|
||||
NFS4_STATEID_OTHER_SIZE))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate the sequenceID sent by the server.
|
||||
* Return success if the sequenceID is one more than what we last saw on
|
||||
|
Reference in New Issue
Block a user