patch-2.3.99-pre4 linux/net/sunrpc/clnt.c

Next file: linux/net/sunrpc/sched.c
Previous file: linux/net/socket.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/net/sunrpc/clnt.c linux/net/sunrpc/clnt.c
@@ -32,6 +32,8 @@
 
 #include <linux/sunrpc/clnt.h>
 
+#include <linux/nfs.h>
+
 
 #define RPC_SLACK_SPACE		1024	/* total overkill */
 
@@ -78,6 +80,7 @@
 #ifdef RPC_DEBUG
 	rpc_register_sysctl();
 #endif
+	xdr_init();
 
 	if (!xprt)
 		goto out;
@@ -198,7 +201,6 @@
 static void
 rpc_default_callback(struct rpc_task *task)
 {
-	rpc_release_task(task);
 }
 
 /*
@@ -263,9 +265,10 @@
 	/* Set up the call info struct and execute the task */
 	if (task->tk_status == 0)
 		status = rpc_execute(task);
-	else
+	else {
 		status = task->tk_status;
-	rpc_release_task(task);
+		rpc_release_task(task);
+	}
 
 	rpc_clnt_sigunmask(clnt, &oldset);		
 
@@ -344,10 +347,9 @@
 void
 rpc_restart_call(struct rpc_task *task)
 {
-	if (task->tk_flags & RPC_TASK_KILLED) {
-		rpc_release_task(task);
+	if (RPC_ASSASSINATED(task))
 		return;
-	}
+
 	task->tk_action = call_reserve;
 	rpcproc_count(task->tk_client, task->tk_msg.rpc_proc)++;
 }
@@ -715,7 +717,7 @@
 	 * The following is an NFS-specific hack to cater for setuid
 	 * processes whose uid is mapped to nobody on the server.
 	 */
-	if (task->tk_client->cl_prog == 100003 && 
+	if (task->tk_client->cl_prog == NFS_PROGRAM && 
             (ntohl(*p) == NFSERR_ACCES || ntohl(*p) == NFSERR_PERM)) {
 		if (RPC_IS_SETUID(task) && task->tk_suid_retry) {
 			dprintk("RPC: %4d retry squashed uid\n", task->tk_pid);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)