Smbmount broken in 2.4.1-ac15?

Urban Widmark urban at teststation.com
Fri Feb 16 23:01:32 GMT 2001


On 17 Feb 2001, Adam Warner wrote:

> I've just joined the list to hopefully get confirmation about what looks to be
> a kernel bug in 2.4.1-ac15. Quite simply I can mount a remote directory and
> even lists its contents but the second I change to that directory (or try to
> access the directory) everything disappears.

Try the attached patch, it should work. This broke in the smbfs
highmem/dircahce fix in 2.4.1-ac13, but was tested using autofs that
really helps in hiding it ...

A very unnecessary bug. Just trying to keep things neat, failing to notice
that only some callers do +1 ... :(

/Urban
-------------- next part --------------
diff -ur -X exclude linux-2.4.1-ac15-orig/fs/smbfs/proc.c linux-2.4.1-ac15-smbfs/fs/smbfs/proc.c
--- linux-2.4.1-ac15-orig/fs/smbfs/proc.c	Fri Feb 16 17:34:18 2001
+++ linux-2.4.1-ac15-smbfs/fs/smbfs/proc.c	Fri Feb 16 18:05:09 2001
@@ -274,7 +274,7 @@
 	}
 out:
 	*(path++) = '\0';
-	return (path-buf-1);
+	return (path-buf);
 }
 
 static int smb_encode_path(struct smb_sb_info *server, char *buf,
@@ -1194,7 +1194,7 @@
 
 out:
 	VERBOSE("ino=%ld, fileid=%d, count=%d, result=%d\n",
-		inode->ino, inode->u.smbfs_i.fileid, count, result);
+		inode->i_ino, inode->u.smbfs_i.fileid, count, result);
 	smb_unlock_server(server);
 	return result;
 }
@@ -1207,7 +1207,7 @@
 	__u8 *p;
 	
 	VERBOSE("ino=%ld, fileid=%d, count=%d@%ld, packet_size=%d\n",
-		inode->ino, inode->u.smbfs_i.fileid, count, offset,
+		inode->i_ino, inode->u.smbfs_i.fileid, count, offset,
 		server->packet_size);
 
 	smb_lock_server(server);
@@ -1583,7 +1583,7 @@
 	static struct qstr mask = { "*.*", 3, 0 };
 	unsigned char *last_status;
 
-	VERBOSE("%s/%s, pos=%d\n", DENTRY_PATH(dir), fpos);
+	VERBOSE("%s/%s\n", DENTRY_PATH(dir));
 
 	smb_lock_server(server);
 
diff -ur -X exclude linux-2.4.1-ac15-orig/fs/smbfs/sock.c linux-2.4.1-ac15-smbfs/fs/smbfs/sock.c
--- linux-2.4.1-ac15-orig/fs/smbfs/sock.c	Fri Feb 16 17:34:18 2001
+++ linux-2.4.1-ac15-smbfs/fs/smbfs/sock.c	Fri Feb 16 17:40:15 2001
@@ -109,7 +109,7 @@
 	struct data_callback* job=ptr;
 	struct socket *socket = job->sk->socket;
 	unsigned char peek_buf[4];
-	int result;
+	int result = 0;
 	mm_segment_t fs;
 	int count = 100;   /* this is a lot, we should have some data waiting */
 	int found = 0;


More information about the samba mailing list