[PATCH] nfsd4: don't create on open that fails due to ERR_GRACE
[pandora-kernel.git] / fs / nfsd / nfs4callback.c
index 68bb245..d828662 100644 (file)
@@ -53,7 +53,7 @@
 #define NFSPROC4_CB_COMPOUND 1
 
 /* declarations */
-static void nfs4_cb_null(struct rpc_task *task);
+static const struct rpc_call_ops nfs4_cb_null_ops;
 
 /* Index of predefined Linux callback client operations */
 
@@ -386,9 +386,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
        char                    hostname[32];
        int status;
 
-       dprintk("NFSD: probe_callback. cb_parsed %d cb_set %d\n",
-                       cb->cb_parsed, atomic_read(&cb->cb_set));
-       if (!cb->cb_parsed || atomic_read(&cb->cb_set))
+       if (atomic_read(&cb->cb_set))
                return;
 
        /* Initialize address */
@@ -433,7 +431,6 @@ nfsd4_probe_callback(struct nfs4_client *clp)
        }
        clnt->cl_intr = 0;
        clnt->cl_softrtry = 1;
-       clnt->cl_chatty = 1;
 
        /* Kick rpciod, put the call on the wire. */
 
@@ -449,7 +446,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
        msg.rpc_cred = nfsd4_lookupcred(clp,0);
        if (IS_ERR(msg.rpc_cred))
                goto out_rpciod;
-       status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, nfs4_cb_null, NULL);
+       status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, &nfs4_cb_null_ops, NULL);
        put_rpccred(msg.rpc_cred);
 
        if (status != 0) {
@@ -471,7 +468,7 @@ out_err:
 }
 
 static void
-nfs4_cb_null(struct rpc_task *task)
+nfs4_cb_null(struct rpc_task *task, void *dummy)
 {
        struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp;
        struct nfs4_callback *cb = &clp->cl_callback;
@@ -490,6 +487,10 @@ out:
        put_nfs4_client(clp);
 }
 
+static const struct rpc_call_ops nfs4_cb_null_ops = {
+       .rpc_call_done = nfs4_cb_null,
+};
+
 /*
  * called with dp->dl_count inc'ed.
  * nfs4_lock_state() may or may not have been called.