Do this for all RPC client related functions and XDR functions.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
        spin_unlock(&rpc_authflavor_lock);
        return ret;
 }
+EXPORT_SYMBOL(rpcauth_register);
 
 int
 rpcauth_unregister(const struct rpc_authops *ops)
        spin_unlock(&rpc_authflavor_lock);
        return ret;
 }
+EXPORT_SYMBOL(rpcauth_unregister);
 
 struct rpc_auth *
 rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt)
 out:
        return auth;
 }
+EXPORT_SYMBOL(rpcauth_create);
 
 void
 rpcauth_release(struct rpc_auth *auth)
        auth->au_credcache = new;
        return 0;
 }
+EXPORT_SYMBOL(rpcauth_init_credcache);
 
 /*
  * Destroy a list of credentials
                kfree(cache);
        }
 }
+EXPORT_SYMBOL(rpcauth_destroy_credcache);
 
 /*
  * Remove stale credentials. Avoid sleeping inside the loop.
 out:
        return cred;
 }
+EXPORT_SYMBOL(rpcauth_lookup_credcache);
 
 struct rpc_cred *
 rpcauth_lookupcred(struct rpc_auth *auth, int flags)
        put_group_info(acred.group_info);
        return ret;
 }
+EXPORT_SYMBOL(rpcauth_lookupcred);
 
 void
 rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred,
 out_destroy:
        cred->cr_ops->crdestroy(cred);
 }
+EXPORT_SYMBOL(put_rpccred);
 
 void
 rpcauth_unbindcred(struct rpc_task *task)
 
        dprintk("RPC:       %s: returned error %d\n", __FUNCTION__, err);
        return ERR_PTR(err);
 }
+EXPORT_SYMBOL(rpc_clone_client);
 
 /*
  * Properly shut down an RPC client, terminating all outstanding
 
        rpc_release_client(clnt);
 }
+EXPORT_SYMBOL(rpc_shutdown_client);
 
 /*
  * Free an RPC client
 out:
        return clnt;
 }
+EXPORT_SYMBOL(rpc_bind_new_program);
 
 /*
  * Default callback for async RPC calls
 {
        rpc_save_sigmask(oldset, clnt->cl_intr);
 }
+EXPORT_SYMBOL(rpc_clnt_sigmask);
 
 void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset)
 {
        rpc_restore_sigmask(oldset);
 }
+EXPORT_SYMBOL(rpc_clnt_sigunmask);
 
 static
 struct rpc_task *rpc_do_run_task(struct rpc_clnt *clnt,
        rpc_put_task(task);
        return status;
 }
+EXPORT_SYMBOL(rpc_call_sync);
 
 /**
  * rpc_call_async - Perform an asynchronous RPC call
        rpc_put_task(task);
        return 0;
 }
+EXPORT_SYMBOL(rpc_call_async);
 
 /**
  * rpc_run_task - Allocate a new RPC task, then run rpc_execute against it
        else
                task->tk_action = rpc_exit_task;
 }
+EXPORT_SYMBOL(rpc_call_setup);
 
 /**
  * rpc_peeraddr - extract remote peer address from clnt's xprt
        if (xprt->ops->set_buffer_size)
                xprt->ops->set_buffer_size(xprt, sndsize, rcvsize);
 }
+EXPORT_SYMBOL(rpc_setbufsize);
 
 /*
  * Return size of largest payload RPC client can support, in bytes
 
        task->tk_action = call_start;
 }
+EXPORT_SYMBOL(rpc_restart_call);
 
 /*
  * 0.  Initial state
 
        wake_up(&rpci->waitq);
        return res;
 }
+EXPORT_SYMBOL(rpc_queue_upcall);
 
 static inline void
 rpc_inode_setowner(struct inode *inode, void *private)
                        -ENOMEM);
        goto out;
 }
+EXPORT_SYMBOL(rpc_mkpipe);
 
 /**
  * rpc_unlink - remove a pipe
        dput(parent);
        return error;
 }
+EXPORT_SYMBOL(rpc_unlink);
 
 /*
  * populate the filesystem
 
        __rpc_sleep_on(q, task, action, timer);
        spin_unlock_bh(&q->lock);
 }
+EXPORT_SYMBOL(rpc_sleep_on);
 
 /**
  * __rpc_do_wake_up_task - wake up a single rpc_task
        }
        rcu_read_unlock_bh();
 }
+EXPORT_SYMBOL(rpc_wake_up_task);
 
 /*
  * Wake up the next task on a priority queue.
 
        return task;
 }
+EXPORT_SYMBOL(rpc_wake_up_next);
 
 /**
  * rpc_wake_up - wake up all rpc_tasks
        spin_unlock(&queue->lock);
        rcu_read_unlock_bh();
 }
+EXPORT_SYMBOL(rpc_wake_up);
 
 /**
  * rpc_wake_up_status - wake up all rpc_tasks and set their status value.
        spin_unlock(&queue->lock);
        rcu_read_unlock_bh();
 }
+EXPORT_SYMBOL(rpc_wake_up_status);
 
 static void __rpc_atrun(struct rpc_task *task)
 {
        task->tk_timeout = delay;
        rpc_sleep_on(&delay_queue, task, NULL, __rpc_atrun);
 }
+EXPORT_SYMBOL(rpc_delay);
 
 /*
  * Helper to call task->tk_ops->rpc_call_prepare
        rpc_set_running(task);
        __rpc_execute(task);
 }
+EXPORT_SYMBOL(rpc_execute);
 
 static void rpc_async_schedule(struct work_struct *work)
 {
        dprintk("RPC:       new task initialized, procpid %u\n",
                                task_pid_nr(current));
 }
+EXPORT_SYMBOL(rpc_init_task);
 
 static struct rpc_task *
 rpc_alloc_task(void)
        }
        spin_unlock(&clnt->cl_lock);
 }
+EXPORT_SYMBOL(rpc_killall_tasks);
 
 int rpciod_up(void)
 {
 
 {
        return do_register(statp->program->name, statp, &rpc_proc_fops);
 }
+EXPORT_SYMBOL(rpc_proc_register);
 
 void
 rpc_proc_unregister(const char *name)
 {
        remove_proc_entry(name, proc_net_rpc);
 }
+EXPORT_SYMBOL(rpc_proc_unregister);
 
 struct proc_dir_entry *
 svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
 
 #include <linux/sunrpc/rpc_pipe_fs.h>
 #include <linux/sunrpc/xprtsock.h>
 
-/* RPC scheduler */
-EXPORT_SYMBOL(rpc_execute);
-EXPORT_SYMBOL(rpc_init_task);
-EXPORT_SYMBOL(rpc_sleep_on);
-EXPORT_SYMBOL(rpc_wake_up_next);
-EXPORT_SYMBOL(rpc_wake_up_task);
-EXPORT_SYMBOL(rpc_wake_up_status);
-
-/* RPC client functions */
-EXPORT_SYMBOL(rpc_clone_client);
-EXPORT_SYMBOL(rpc_bind_new_program);
-EXPORT_SYMBOL(rpc_shutdown_client);
-EXPORT_SYMBOL(rpc_killall_tasks);
-EXPORT_SYMBOL(rpc_call_sync);
-EXPORT_SYMBOL(rpc_call_async);
-EXPORT_SYMBOL(rpc_call_setup);
-EXPORT_SYMBOL(rpc_clnt_sigmask);
-EXPORT_SYMBOL(rpc_clnt_sigunmask);
-EXPORT_SYMBOL(rpc_delay);
-EXPORT_SYMBOL(rpc_restart_call);
-EXPORT_SYMBOL(rpc_setbufsize);
-EXPORT_SYMBOL(rpc_unlink);
-EXPORT_SYMBOL(rpc_wake_up);
-EXPORT_SYMBOL(rpc_queue_upcall);
-EXPORT_SYMBOL(rpc_mkpipe);
-
-/* Client transport */
-EXPORT_SYMBOL(xprt_set_timeout);
-
-/* Client credential cache */
-EXPORT_SYMBOL(rpcauth_register);
-EXPORT_SYMBOL(rpcauth_unregister);
-EXPORT_SYMBOL(rpcauth_create);
-EXPORT_SYMBOL(rpcauth_lookupcred);
-EXPORT_SYMBOL(rpcauth_lookup_credcache);
-EXPORT_SYMBOL(rpcauth_destroy_credcache);
-EXPORT_SYMBOL(rpcauth_init_credcache);
-EXPORT_SYMBOL(put_rpccred);
-
 /* RPC server stuff */
 EXPORT_SYMBOL(svc_create);
 EXPORT_SYMBOL(svc_create_thread);
 
 /* RPC statistics */
 #ifdef CONFIG_PROC_FS
-EXPORT_SYMBOL(rpc_proc_register);
-EXPORT_SYMBOL(rpc_proc_unregister);
 EXPORT_SYMBOL(svc_proc_register);
 EXPORT_SYMBOL(svc_proc_unregister);
 EXPORT_SYMBOL(svc_seq_show);
 EXPORT_SYMBOL(svcauth_unix_purge);
 EXPORT_SYMBOL(unix_domain_find);
 
-/* Generic XDR */
-EXPORT_SYMBOL(xdr_encode_string);
-EXPORT_SYMBOL(xdr_decode_string_inplace);
-EXPORT_SYMBOL(xdr_decode_netobj);
-EXPORT_SYMBOL(xdr_encode_netobj);
-EXPORT_SYMBOL(xdr_encode_pages);
-EXPORT_SYMBOL(xdr_inline_pages);
-EXPORT_SYMBOL(xdr_shift_buf);
-EXPORT_SYMBOL(xdr_encode_word);
-EXPORT_SYMBOL(xdr_decode_word);
-EXPORT_SYMBOL(xdr_encode_array2);
-EXPORT_SYMBOL(xdr_decode_array2);
-EXPORT_SYMBOL(xdr_buf_from_iov);
-EXPORT_SYMBOL(xdr_buf_subsegment);
-EXPORT_SYMBOL(xdr_buf_read_netobj);
-EXPORT_SYMBOL(read_bytes_from_xdr_buf);
-
-/* Debugging symbols */
-#ifdef RPC_DEBUG
-EXPORT_SYMBOL(rpc_debug);
-EXPORT_SYMBOL(nfs_debug);
-EXPORT_SYMBOL(nfsd_debug);
-EXPORT_SYMBOL(nlm_debug);
-#endif
-
 extern struct cache_detail ip_map_cache, unix_gid_cache;
 
 static int __init
 
  * Declare the debug flags here
  */
 unsigned int   rpc_debug;
+EXPORT_SYMBOL(rpc_debug);
+
 unsigned int   nfs_debug;
+EXPORT_SYMBOL(nfs_debug);
+
 unsigned int   nfsd_debug;
+EXPORT_SYMBOL(nfsd_debug);
+
 unsigned int   nlm_debug;
+EXPORT_SYMBOL(nlm_debug);
 
 #ifdef RPC_DEBUG
 
 
        memcpy(p, obj->data, obj->len);
        return p + XDR_QUADLEN(obj->len);
 }
+EXPORT_SYMBOL(xdr_encode_netobj);
 
 __be32 *
 xdr_decode_netobj(__be32 *p, struct xdr_netobj *obj)
        obj->data = (u8 *) p;
        return p + XDR_QUADLEN(len);
 }
+EXPORT_SYMBOL(xdr_decode_netobj);
 
 /**
  * xdr_encode_opaque_fixed - Encode fixed length opaque data
 {
        return xdr_encode_array(p, string, strlen(string));
 }
+EXPORT_SYMBOL(xdr_encode_string);
 
 __be32 *
 xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen)
        *sp = (char *) p;
        return p + XDR_QUADLEN(len);
 }
+EXPORT_SYMBOL(xdr_decode_string_inplace);
 
 void
 xdr_encode_pages(struct xdr_buf *xdr, struct page **pages, unsigned int base,
        xdr->buflen += len;
        xdr->len += len;
 }
+EXPORT_SYMBOL(xdr_encode_pages);
 
 void
 xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset,
 
        xdr->buflen += len;
 }
-
+EXPORT_SYMBOL(xdr_inline_pages);
 
 /*
  * Helper routines for doing 'memmove' like operations on a struct xdr_buf
 {
        xdr_shrink_bufhead(buf, len);
 }
+EXPORT_SYMBOL(xdr_shift_buf);
 
 /**
  * xdr_init_encode - Initialize a struct xdr_stream for sending data.
        buf->page_len = 0;
        buf->buflen = buf->len = iov->iov_len;
 }
+EXPORT_SYMBOL(xdr_buf_from_iov);
 
 /* Sets subbuf to the portion of buf of length len beginning base bytes
  * from the start of buf. Returns -1 if base of length are out of bounds. */
                return -1;
        return 0;
 }
+EXPORT_SYMBOL(xdr_buf_subsegment);
 
 static void __read_bytes_from_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len)
 {
        __read_bytes_from_xdr_buf(&subbuf, obj, len);
        return 0;
 }
+EXPORT_SYMBOL(read_bytes_from_xdr_buf);
 
 static void __write_bytes_to_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned int len)
 {
        *obj = ntohl(raw);
        return 0;
 }
+EXPORT_SYMBOL(xdr_decode_word);
 
 int
 xdr_encode_word(struct xdr_buf *buf, unsigned int base, u32 obj)
 
        return write_bytes_to_xdr_buf(buf, base, &raw, sizeof(obj));
 }
+EXPORT_SYMBOL(xdr_encode_word);
 
 /* If the netobj starting offset bytes from the start of xdr_buf is contained
  * entirely in the head or the tail, set object to point to it; otherwise
        __read_bytes_from_xdr_buf(&subbuf, obj->data, obj->len);
        return 0;
 }
+EXPORT_SYMBOL(xdr_buf_read_netobj);
 
 /* Returns 0 on success, or else a negative error code. */
 static int
 
        return xdr_xcode_array2(buf, base, desc, 0);
 }
+EXPORT_SYMBOL(xdr_decode_array2);
 
 int
 xdr_encode_array2(struct xdr_buf *buf, unsigned int base,
 
        return xdr_xcode_array2(buf, base, desc, 1);
 }
+EXPORT_SYMBOL(xdr_encode_array2);
 
 int
 xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len,
 
        to->to_retries   = retr;
        to->to_exponential = 0;
 }
+EXPORT_SYMBOL(xprt_set_timeout);
 
 /**
  * xprt_create_transport - create an RPC transport