patch-1.3.9 linux/fs/smbfs/inode.c

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

diff -u --recursive --new-file v1.3.8/linux/fs/smbfs/inode.c linux/fs/smbfs/inode.c
@@ -250,6 +250,8 @@
 	server->m.dir_mode  = (server->m.dir_mode &
                              (S_IRWXU|S_IRWXG|S_IRWXO)) | S_IFDIR;
 
+        smb_init_root(server);
+
         /*
          * Make the connection to the server
          */
@@ -278,19 +280,19 @@
                 goto fail;
 	}
 
+	if ((error = smb_stat_root(server)) < 0) {
+		sb->s_dev = 0;
+		printk("smb_read_super: could not get root dir attributes\n");
+                smb_kfree_s(server->packet, server->max_xmit);
+                goto fail;
+	}
+
 	DPRINTK("smb_read_super : %u %u %u %u\n",
                 SMB_SBP(sb)->s_attr.total,
                 SMB_SBP(sb)->s_attr.blocksize,
                 SMB_SBP(sb)->s_attr.allocblocks,
                 SMB_SBP(sb)->s_attr.free);
 
-        if (smb_init_root(server) != 0) {
-                sb->s_dev = 0;
-                printk("smb_read_super: invalid root directory\n");
-                smb_kfree_s(server->packet, server->max_xmit);
-                goto fail;
-        }
-
         DPRINTK("smb_read_super: SMB_SBP(sb) = %x\n", (int)SMB_SBP(sb));
 
 	if (!(sb->s_mounted = iget(sb, (int)&(server->root)))) {
@@ -406,7 +408,7 @@
 
 #ifdef MODULE
 
-static char kernel_version[] = UTS_RELEASE;
+char kernel_version[] = UTS_RELEASE;
 
 /* looks ugly, taken from gcc-info */
 static void *shut_up_gcc = (&shut_up_gcc, kernel_version);

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