hw-breakpoint: Move asm-generic/hw_breakpoint.h to linux/hw_breakpoint.h
[safe/jmp/linux-2.6] / fs / nfs / idmap.c
index d93e071..21a84d4 100644 (file)
@@ -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];
 };
 
@@ -101,7 +101,7 @@ static void idmap_pipe_destroy_msg(struct rpc_pipe_msg *);
 
 static unsigned int fnvhash32(const void *, size_t);
 
-static struct rpc_pipe_ops idmap_upcall_ops = {
+static const struct rpc_pipe_ops idmap_upcall_ops = {
        .upcall         = idmap_pipe_upcall,
        .downcall       = idmap_pipe_downcall,
        .destroy_msg    = idmap_pipe_destroy_msg,
@@ -119,8 +119,8 @@ nfs_idmap_new(struct nfs_client *clp)
        if (idmap == NULL)
                return -ENOMEM;
 
-       idmap->idmap_dentry = rpc_mkpipe(clp->cl_rpcclient->cl_dentry, "idmap",
-                                        idmap, &idmap_upcall_ops, 0);
+       idmap->idmap_dentry = rpc_mkpipe(clp->cl_rpcclient->cl_path.dentry,
+                       "idmap", idmap, &idmap_upcall_ops, 0);
        if (IS_ERR(idmap->idmap_dentry)) {
                error = PTR_ERR(idmap->idmap_dentry);
                kfree(idmap);
@@ -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);
 }
@@ -309,7 +309,7 @@ nfs_idmap_name(struct idmap *idmap, struct idmap_hashtable *h,
        mutex_lock(&idmap->idmap_im_lock);
 
        he = idmap_lookup_id(h, id);
-       if (he != 0) {
+       if (he) {
                memcpy(name, he->ih_name, he->ih_namelen);
                ret = he->ih_namelen;
                goto out;
@@ -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))