summaryrefslogtreecommitdiffstats
path: root/fs/nfs/idmap.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-12-20 14:54:49 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:06:01 -0500
commitd24aae41b4d4141d4f3cffdbf4c31d85637ba691 (patch)
tree837cf221908b34da1a6d5733c68578721f5b0610 /fs/nfs/idmap.c
parenta661b77fc12a172edea4b709e37f8cd58a6bd500 (diff)
NFS: Use size_t for storing name lengths
Clean up: always use the same type when handling buffer lengths. As a bonus, this prevents a mixed sign comparison in idmap_lookup_name. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/idmap.c')
-rw-r--r--fs/nfs/idmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index d93e071b900..8ae5dba2d4e 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -74,7 +74,7 @@ module_param_call(idmap_cache_timeout, param_set_idmap_timeout, param_get_int,
struct idmap_hashent {
unsigned long ih_expires;
__u32 ih_id;
- int ih_namelen;
+ size_t ih_namelen;
char ih_name[IDMAP_NAMESZ];
};
@@ -193,7 +193,7 @@ idmap_lookup_id(struct idmap_hashtable *h, __u32 id)
* pretty trivial.
*/
static inline struct idmap_hashent *
-idmap_alloc_name(struct idmap_hashtable *h, char *name, unsigned len)
+idmap_alloc_name(struct idmap_hashtable *h, char *name, size_t len)
{
return idmap_name_hash(h, name, len);
}
@@ -381,7 +381,7 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
struct idmap_msg im_in, *im = &idmap->idmap_im;
struct idmap_hashtable *h;
struct idmap_hashent *he = NULL;
- int namelen_in;
+ size_t namelen_in;
int ret;
if (mlen != sizeof(im_in))