aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
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
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')
-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 d93e071b900c..8ae5dba2d4e5 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,
74struct idmap_hashent { 74struct idmap_hashent {
75 unsigned long ih_expires; 75 unsigned long ih_expires;
76 __u32 ih_id; 76 __u32 ih_id;
77 int ih_namelen; 77 size_t ih_namelen;
78 char ih_name[IDMAP_NAMESZ]; 78 char ih_name[IDMAP_NAMESZ];
79}; 79};
80 80
@@ -193,7 +193,7 @@ idmap_lookup_id(struct idmap_hashtable *h, __u32 id)
193 * pretty trivial. 193 * pretty trivial.
194 */ 194 */
195static inline struct idmap_hashent * 195static inline struct idmap_hashent *
196idmap_alloc_name(struct idmap_hashtable *h, char *name, unsigned len) 196idmap_alloc_name(struct idmap_hashtable *h, char *name, size_t len)
197{ 197{
198 return idmap_name_hash(h, name, len); 198 return idmap_name_hash(h, name, len);
199} 199}
@@ -381,7 +381,7 @@ idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
381 struct idmap_msg im_in, *im = &idmap->idmap_im; 381 struct idmap_msg im_in, *im = &idmap->idmap_im;
382 struct idmap_hashtable *h; 382 struct idmap_hashtable *h;
383 struct idmap_hashent *he = NULL; 383 struct idmap_hashent *he = NULL;
384 int namelen_in; 384 size_t namelen_in;
385 int ret; 385 int ret;
386 386
387 if (mlen != sizeof(im_in)) 387 if (mlen != sizeof(im_in))