[PATCH] smbfs doesn't compile with debug option turned on in linux-2.6

" Grigorii Rubtsov " grigoriir at mail.ru
Thu Jan 22 15:28:55 GMT 2004


 Dear Samba developers!

The type of i_mtime member of struct inode have been changed from time_t i_mtime in 2.4 to struct timespec i_mtime in 2.6. This still have not been corrected for
debug output code, as verbose output is not default compile option.
The following patch fixes compilation errors and warnings. Please apply.

Best regards,
Grigory Rubtsov.


diff -u linux-2.6.1/fs/smbfs/file.c linux/fs/smbfs/file.c
--- linux-2.6.1/fs/smbfs/file.c	2003-12-18 05:59:35.000000000 +0300
+++ linux/fs/smbfs/file.c	2004-01-22 18:20:04.023631032 +0300
@@ -233,7 +233,7 @@
 
 	VERBOSE("before read, size=%ld, flags=%x, atime=%ld\n",
 		(long)dentry->d_inode->i_size,
-		dentry->d_inode->i_flags, dentry->d_inode->i_atime);
+		dentry->d_inode->i_flags, dentry->d_inode->i_atime.tv_sec);
 
 	status = generic_file_read(file, buf, count, ppos);
 out:
@@ -322,7 +322,8 @@
 		result = generic_file_write(file, buf, count, ppos);
 		VERBOSE("pos=%ld, size=%ld, mtime=%ld, atime=%ld\n",
 			(long) file->f_pos, (long) dentry->d_inode->i_size,
-			dentry->d_inode->i_mtime, dentry->d_inode->i_atime);
+			dentry->d_inode->i_mtime.tv_sec,
+			dentry->d_inode->i_atime.tv_sec);
 	}
 out:
 	return result;
diff -u linux-2.6.1/fs/smbfs/inode.c linux/fs/smbfs/inode.c
--- linux-2.6.1/fs/smbfs/inode.c	2003-12-18 05:58:15.000000000 +0300
+++ linux/fs/smbfs/inode.c	2004-01-22 17:55:14.473077136 +0300
@@ -209,7 +209,7 @@
 	if (inode->i_mtime.tv_sec != last_time || inode->i_size != last_sz) {
 		VERBOSE("%ld changed, old=%ld, new=%ld, oz=%ld, nz=%ld\n",
 			inode->i_ino,
-			(long) last_time, (long) inode->i_mtime,
+			(long) last_time, (long) inode->i_mtime.tv_sec,
 			(long) last_sz, (long) inode->i_size);
 
 		if (!S_ISDIR(inode->i_mode))
diff -u linux-2.6.1/fs/smbfs/proc.c linux/fs/smbfs/proc.c
--- linux-2.6.1/fs/smbfs/proc.c	2003-12-18 05:58:15.000000000 +0300
+++ linux/fs/smbfs/proc.c	2004-01-22 18:20:09.084861608 +0300
@@ -2570,7 +2570,7 @@
 	fattr->f_mtime.tv_sec = date_dos2unix(server, date, time);
 	fattr->f_mtime.tv_nsec = 0;
 	VERBOSE("name=%s, date=%x, time=%x, mtime=%ld\n",
-		mask, date, time, fattr->f_mtime);
+		mask, date, time, fattr->f_mtime.tv_sec);
 	fattr->f_size = DVAL(req->rq_data, 12);
 	/* ULONG allocation size */
 	fattr->attr = WVAL(req->rq_data, 20);



More information about the samba-technical mailing list