patch-2.4.26 linux-2.4.26/fs/smbfs/proc.c

Next file: linux-2.4.26/fs/xfs/Makefile
Previous file: linux-2.4.26/fs/nfs/write.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/fs/smbfs/proc.c linux-2.4.26/fs/smbfs/proc.c
@@ -915,7 +915,9 @@
 		SB_of(server)->s_maxbytes = ~0ULL >> 1;
 		VERBOSE("LFS enabled\n");
 	}
-#ifdef CONFIG_SMB_UNIX
+#ifndef CONFIG_SMB_UNIX
+	server->opt.capabilities &= ~SMB_CAP_UNIX;
+#endif
 	if (server->opt.capabilities & SMB_CAP_UNIX) {
 		struct inode *inode;
 		VERBOSE("Using UNIX CIFS extensions\n");
@@ -924,9 +926,6 @@
 		if (inode)
 			inode->i_op = &smb_dir_inode_operations_unix;
 	}
-#else
-	server->opt.capabilities &= ~SMB_CAP_UNIX;
-#endif
 
 	VERBOSE("protocol=%d, max_xmit=%d, pid=%d capabilities=0x%x\n",
 		server->opt.protocol, server->opt.max_xmit, server->conn_pid,
@@ -2615,9 +2614,18 @@
 	struct inode *inode = dir->d_inode;
 	int result;
 
+retry:
 	result = smb_proc_getattr_trans2_std(server, dir, attr);
-	if (result < 0)
+	if (result < 0) {
+		if (server->rcls == ERRSRV && server->err == ERRerror) {
+			/* a damn Win95 bug - sometimes it clags if you 
+			   ask it too fast */
+			current->state = TASK_INTERRUPTIBLE;
+			schedule_timeout(HZ/5);
+			goto retry;
+		}
 		goto out;
+	}
 
 	/*
 	 * None of the other getattr versions here can make win9x

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