summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@fys.uio.no>2004-08-23 10:16:26 -0400
committerTrond Myklebust <trond.myklebust@fys.uio.no>2004-08-23 10:16:26 -0400
commitdb9b4e94c1f0ca2477dae883d9d0589e7e7e0949 (patch)
treeff4cce5d29be0df3595110f12b727061a2591859 /include/linux
parent14671e6fe66aa62b3086a372013dd9bc4124aec1 (diff)
NFS: Now that file handle comparison ignores the unused parts of the
file handle container, there is no longer any need to clear the file handle container before copying in a file handle. This allows us to remove a 128 byte memset() from several hot paths. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/nfs.h b/include/linux/nfs.h
index 11a05d8a1f24..ca2ffa6ae1d5 100644
--- a/include/linux/nfs.h
+++ b/include/linux/nfs.h
@@ -148,6 +148,12 @@ static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
}
+static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
+{
+ target->size = source->size;
+ memcpy(target->data, source->data, source->size);
+}
+
/*
* This is really a general kernel constant, but since nothing like