patch-1.3.83 linux/fs/nfs/rpcsock.c

Next file: linux/fs/proc/mem.c
Previous file: linux/fs/ncpfs/sock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.82/linux/fs/nfs/rpcsock.c linux/fs/nfs/rpcsock.c
@@ -412,10 +412,8 @@
 		while (rsock->pending != slot) {
 			if (!slot->w_gotit)
 				interruptible_sleep_on(&slot->w_wait);
-			if (slot->w_gotit) {
-				result = slot->w_result; /* quite important */
-				return result;
-			}
+			if (slot->w_gotit)
+				return slot->w_result; /* quite important */
 			if (current->signal & ~current->blocked)
 				return -ERESTARTSYS;
 			if (rsock->shutdown)
@@ -427,15 +425,15 @@
 		/* Wait for data to arrive */
 		if ((result = rpc_select(rsock)) < 0) {
 			dprintk("RPC: select error = %d\n", result);
-			break;
+			return result;
 		}
 
 		/* Receive and dispatch */
 		if ((result = rpc_grok(rsock)) < 0)
-			break;
+			return result;
 	} while (current->timeout && !slot->w_gotit);
 
-	return slot->w_gotit? result : -ETIMEDOUT;
+	return slot->w_gotit? slot->w_result : -ETIMEDOUT;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this