patch-2.1.73 linux/fs/smbfs/sock.c

Next file: linux/fs/sysv/namei.c
Previous file: linux/fs/smbfs/proc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.72/linux/fs/smbfs/sock.c linux/fs/smbfs/sock.c
@@ -397,10 +397,6 @@
 	{
 		int new_len = smb_round_length(len + 4);
 
-#ifdef SMBFS_PARANOIA
-printk("smb_receive: Increase packet size from %d to %d\n",
-server->packet_size, new_len);
-#endif
 		result = -ENOMEM;
 		packet = smb_vmalloc(new_len);
 		if (packet == NULL)
@@ -655,6 +651,17 @@
 	}
 	if (result < 0)
 		goto bad_conn;
+	/*
+	 * Check for fatal server errors ...
+	 */
+	if (server->rcls) {
+		int error = smb_errno(server);
+		if (error == EBADSLT) {
+			printk("smb_request: tree ID invalid\n");
+			result = error;
+			goto bad_conn;
+		}
+	}
 
 out:
 	pr_debug("smb_request: result = %d\n", result);
@@ -827,6 +834,17 @@
 	}
 	if (result < 0)
 		goto bad_conn;
+	/*
+	 * Check for fatal server errors ...
+	 */
+	if (server->rcls) {
+		int error = smb_errno(server);
+		if (error == EBADSLT) {
+			printk("smb_request: tree ID invalid\n");
+			result = error;
+			goto bad_conn;
+		}
+	}
 
 out:
 	return result;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov