SUNRPC: Remove redundant calls to rpciod_up()/rpciod_down()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 14 Jun 2007 21:31:58 +0000 (17:31 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Jul 2007 03:40:30 +0000 (23:40 -0400)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/lockd/svc.c
fs/nfs/client.c
fs/nfsd/nfs4callback.c
fs/nfsd/nfs4state.c
include/linux/nfs_fs_sb.h
net/sunrpc/sunrpc_syms.c

index 126b1bf02c0ec2d8b5c051eb1e29acf27d6a32b3..26809325469cdc73bafa76dec33e52cfa046f548 100644 (file)
@@ -123,9 +123,6 @@ lockd(struct svc_rqst *rqstp)
        /* Process request with signals blocked, but allow SIGKILL.  */
        allow_signal(SIGKILL);
 
-       /* kick rpciod */
-       rpciod_up();
-
        dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n");
 
        if (!nlm_timeout)
@@ -202,9 +199,6 @@ lockd(struct svc_rqst *rqstp)
        /* Exit the RPC thread */
        svc_exit_thread(rqstp);
 
-       /* release rpciod */
-       rpciod_down();
-
        /* Release module */
        unlock_kernel();
        module_put_and_exit(0);
index 881fa490092393c97ee5c69dd2cfe33e6bd9c3c0..71d4c4cdac5280a3ccbc75a382d4dfa9bf5316b7 100644 (file)
@@ -102,19 +102,10 @@ static struct nfs_client *nfs_alloc_client(const char *hostname,
                                           int nfsversion)
 {
        struct nfs_client *clp;
-       int error;
 
        if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL)
                goto error_0;
 
-       error = rpciod_up();
-       if (error < 0) {
-               dprintk("%s: couldn't start rpciod! Error = %d\n",
-                               __FUNCTION__, error);
-               goto error_1;
-       }
-       __set_bit(NFS_CS_RPCIOD, &clp->cl_res_state);
-
        if (nfsversion == 4) {
                if (nfs_callback_up() < 0)
                        goto error_2;
@@ -154,9 +145,6 @@ error_3:
        if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state))
                nfs_callback_down();
 error_2:
-       rpciod_down();
-       __clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state);
-error_1:
        kfree(clp);
 error_0:
        return NULL;
@@ -198,9 +186,6 @@ static void nfs_free_client(struct nfs_client *clp)
        if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state))
                nfs_callback_down();
 
-       if (__test_and_clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state))
-               rpciod_down();
-
        kfree(clp->cl_hostname);
        kfree(clp);
 
index 864090edc28b2faebb78da68b085208518150cdb..6b1b487db1ecb86e21d622f63b0c6dfc87a1bfa8 100644 (file)
@@ -429,29 +429,23 @@ nfsd4_probe_callback(struct nfs4_client *clp)
                goto out_err;
        }
 
-       /* Kick rpciod, put the call on the wire. */
-       if (rpciod_up() != 0)
-               goto out_clnt;
-
        /* the task holds a reference to the nfs4_client struct */
        atomic_inc(&clp->cl_count);
 
        msg.rpc_cred = nfsd4_lookupcred(clp,0);
        if (IS_ERR(msg.rpc_cred))
-               goto out_rpciod;
+               goto out_release_clp;
        status = rpc_call_async(cb->cb_client, &msg, RPC_TASK_ASYNC, &nfs4_cb_null_ops, NULL);
        put_rpccred(msg.rpc_cred);
 
        if (status != 0) {
                dprintk("NFSD: asynchronous NFSPROC4_CB_NULL failed!\n");
-               goto out_rpciod;
+               goto out_release_clp;
        }
        return;
 
-out_rpciod:
+out_release_clp:
        atomic_dec(&clp->cl_count);
-       rpciod_down();
-out_clnt:
        rpc_shutdown_client(cb->cb_client);
 out_err:
        cb->cb_client = NULL;
index 3cc8ce422ab1a245a746cc15401be505031f17c2..8c52913d7cb6ddfb461ac3e72c3c1ab1f93c8f53 100644 (file)
@@ -378,7 +378,6 @@ shutdown_callback_client(struct nfs4_client *clp)
        if (clnt) {
                clp->cl_callback.cb_client = NULL;
                rpc_shutdown_client(clnt);
-               rpciod_down();
        }
 }
 
index 52b4378311c86393e04038d17eb1f9466f980bc5..144d955dc46adc791c633e684f60b9492f2c8b60 100644 (file)
@@ -16,7 +16,6 @@ struct nfs_client {
 #define NFS_CS_INITING         1               /* busy initialising */
        int                     cl_nfsversion;  /* NFS protocol version */
        unsigned long           cl_res_state;   /* NFS resources state */
-#define NFS_CS_RPCIOD          0               /* - rpciod started */
 #define NFS_CS_CALLBACK                1               /* - callback started */
 #define NFS_CS_IDMAP           2               /* - idmap started */
 #define NFS_CS_RENEWD          3               /* - renewd started */
index 02e83e15fef5b5136c8e22f6952005aedbfc1278..b99b11b11461fcffe8b3cad99d0ee20da9108b0e 100644 (file)
@@ -28,8 +28,6 @@ EXPORT_SYMBOL(rpc_init_task);
 EXPORT_SYMBOL(rpc_sleep_on);
 EXPORT_SYMBOL(rpc_wake_up_next);
 EXPORT_SYMBOL(rpc_wake_up_task);
-EXPORT_SYMBOL(rpciod_down);
-EXPORT_SYMBOL(rpciod_up);
 EXPORT_SYMBOL(rpc_wake_up_status);
 
 /* RPC client functions */