]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/nfs4callback.c
Pull acpica into release branch
[linux-2.6-omap-h63xx.git] / fs / nfsd / nfs4callback.c
index fb14d68eacab846db08f92bbcdca7a1aff56e43c..31d6633c7fe46345b7ec60a74caa0aa92e077d11 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/inet.h>
 #include <linux/errno.h>
 #include <linux/delay.h>
+#include <linux/sched.h>
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/clnt.h>
@@ -74,7 +75,7 @@ enum nfs_cb_opnum4 {
 #define op_enc_sz                      1
 #define op_dec_sz                      2
 #define enc_nfs4_fh_sz                 (1 + (NFS4_FHSIZE >> 2))
-#define enc_stateid_sz                 16
+#define enc_stateid_sz                 (NFS4_STATEID_SIZE >> 2)
 #define NFS4_enc_cb_recall_sz          (cb_compound_enc_hdr_sz +       \
                                        1 + enc_stateid_sz +            \
                                        enc_nfs4_fh_sz)
@@ -315,16 +316,13 @@ out:
 /*
  * RPC procedure tables
  */
-#ifndef MAX
-# define MAX(a, b)      (((a) > (b))? (a) : (b))
-#endif
-
 #define PROC(proc, call, argtype, restype)                              \
 [NFSPROC4_CLNT_##proc] = {                                             \
         .p_proc   = NFSPROC4_CB_##call,                                        \
         .p_encode = (kxdrproc_t) nfs4_xdr_##argtype,                    \
         .p_decode = (kxdrproc_t) nfs4_xdr_##restype,                    \
-        .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2,  \
+        .p_arglen = NFS4_##argtype##_sz,                                \
+        .p_replen = NFS4_##restype##_sz,                                \
         .p_statidx = NFSPROC4_CB_##call,                               \
        .p_name   = #proc,                                              \
 }
@@ -396,7 +394,6 @@ nfsd4_probe_callback(struct nfs4_client *clp)
                .rpc_proc       = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL],
                .rpc_argp       = clp,
        };
-       char clientname[16];
        int status;
 
        if (atomic_read(&cb->cb_set))
@@ -419,11 +416,6 @@ nfsd4_probe_callback(struct nfs4_client *clp)
        memset(program->stats, 0, sizeof(cb->cb_stat));
        program->stats->program = program;
 
-       /* Just here to make some printk's more useful: */
-       snprintf(clientname, sizeof(clientname),
-               "%u.%u.%u.%u", NIPQUAD(addr.sin_addr));
-       args.servername = clientname;
-
        /* Create RPC client */
        cb->cb_client = rpc_create(&args);
        if (IS_ERR(cb->cb_client)) {
@@ -431,29 +423,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;