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:46 -0500 |
commit | f597c53790f662662281b82b7692a22d2a4d4afa (patch) | |
tree | 3567e1c7e232973fee14b7ddffa3545cd88392d0 /fs/nfs/nfs4_fs.h | |
parent | 1e3987c3052a48fbfc8f5d30214c825eff41192d (diff) |
NFSv4: Add helpers for basic copying of stateids
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r-- | fs/nfs/nfs4_fs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 308d2f999c3d..1c54ef3146d4 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -349,6 +349,16 @@ struct nfs4_mount_data; | |||
349 | extern struct svc_version nfs4_callback_version1; | 349 | extern struct svc_version nfs4_callback_version1; |
350 | extern struct svc_version nfs4_callback_version4; | 350 | extern struct svc_version nfs4_callback_version4; |
351 | 351 | ||
352 | static inline void nfs4_stateid_copy(nfs4_stateid *dst, const nfs4_stateid *src) | ||
353 | { | ||
354 | memcpy(dst->data, src->data, sizeof(dst->data)); | ||
355 | } | ||
356 | |||
357 | static inline bool nfs4_stateid_match(const nfs4_stateid *dst, const nfs4_stateid *src) | ||
358 | { | ||
359 | return memcmp(dst->data, src->data, sizeof(dst->data)) == 0; | ||
360 | } | ||
361 | |||
352 | #else | 362 | #else |
353 | 363 | ||
354 | #define nfs4_close_state(a, b) do { } while (0) | 364 | #define nfs4_close_state(a, b) do { } while (0) |