]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/nfs/idmap.c
Merge branch 'for-linus' of git://ceph.newdream.net/git/ceph-client
[karo-tx-linux.git] / fs / nfs / idmap.c
index f20801ae0a16582850f95e03f148d5b704b720aa..47d1c6ff2d8e845625e60fbcf3ba5cf65786282e 100644 (file)
@@ -336,8 +336,6 @@ struct idmap {
        struct idmap_hashtable  idmap_group_hash;
 };
 
-static ssize_t idmap_pipe_upcall(struct file *, struct rpc_pipe_msg *,
-                                char __user *, size_t);
 static ssize_t idmap_pipe_downcall(struct file *, const char __user *,
                                   size_t);
 static void idmap_pipe_destroy_msg(struct rpc_pipe_msg *);
@@ -345,7 +343,7 @@ static void idmap_pipe_destroy_msg(struct rpc_pipe_msg *);
 static unsigned int fnvhash32(const void *, size_t);
 
 static const struct rpc_pipe_ops idmap_upcall_ops = {
-       .upcall         = idmap_pipe_upcall,
+       .upcall         = rpc_pipe_generic_upcall,
        .downcall       = idmap_pipe_downcall,
        .destroy_msg    = idmap_pipe_destroy_msg,
 };
@@ -595,27 +593,6 @@ nfs_idmap_name(struct idmap *idmap, struct idmap_hashtable *h,
        return ret;
 }
 
-/* RPC pipefs upcall/downcall routines */
-static ssize_t
-idmap_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
-                 char __user *dst, size_t buflen)
-{
-       char *data = (char *)msg->data + msg->copied;
-       size_t mlen = min(msg->len, buflen);
-       unsigned long left;
-
-       left = copy_to_user(dst, data, mlen);
-       if (left == mlen) {
-               msg->errno = -EFAULT;
-               return -EFAULT;
-       }
-
-       mlen -= left;
-       msg->copied += mlen;
-       msg->errno = 0;
-       return mlen;
-}
-
 static ssize_t
 idmap_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
 {