diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-04 18:13:56 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-06 10:32:44 -0500 |
commit | 36281caa839f4441c793c81d2e3cc5ea44ad5aa2 (patch) | |
tree | be5471741713d77681fcf1e161b0748343748977 /fs/nfs/callback_proc.c | |
parent | 8e663f0e5fabf57065aed1cfdaff5b13057dce23 (diff) |
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>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r-- | fs/nfs/callback_proc.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index ea8321923f28..1b5d809a105e 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -98,14 +98,6 @@ out: | |||
98 | return res; | 98 | return res; |
99 | } | 99 | } |
100 | 100 | ||
101 | int nfs4_validate_delegation_stateid(struct nfs_delegation *delegation, const nfs4_stateid *stateid) | ||
102 | { | ||
103 | if (delegation == NULL || memcmp(delegation->stateid.data, stateid->data, | ||
104 | sizeof(delegation->stateid.data)) != 0) | ||
105 | return 0; | ||
106 | return 1; | ||
107 | } | ||
108 | |||
109 | #if defined(CONFIG_NFS_V4_1) | 101 | #if defined(CONFIG_NFS_V4_1) |
110 | 102 | ||
111 | /* | 103 | /* |
@@ -319,22 +311,6 @@ out: | |||
319 | return res; | 311 | return res; |
320 | } | 312 | } |
321 | 313 | ||
322 | int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, const nfs4_stateid *stateid) | ||
323 | { | ||
324 | if (delegation == NULL) | ||
325 | return 0; | ||
326 | |||
327 | if (stateid->stateid.seqid != 0 && | ||
328 | stateid->stateid.seqid != delegation->stateid.stateid.seqid) | ||
329 | return 0; | ||
330 | if (memcmp(delegation->stateid.stateid.other, | ||
331 | stateid->stateid.other, | ||
332 | NFS4_STATEID_OTHER_SIZE)) | ||
333 | return 0; | ||
334 | |||
335 | return 1; | ||
336 | } | ||
337 | |||
338 | /* | 314 | /* |
339 | * Validate the sequenceID sent by the server. | 315 | * Validate the sequenceID sent by the server. |
340 | * Return success if the sequenceID is one more than what we last saw on | 316 | * Return success if the sequenceID is one more than what we last saw on |