svn commit: linux-cifs-client r75 - in branches/linux-converged-for-old-kernels/fs/cifs: .

sfrench at samba.org sfrench at samba.org
Mon Aug 21 17:08:04 GMT 2006


Author: sfrench
Date: 2006-08-21 17:08:04 +0000 (Mon, 21 Aug 2006)
New Revision: 75

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=75

Log:
More 2.4 build enablement of current cifs vfs.

Thanks to Yehuda Weinraub for his help on this

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/dir.c
   branches/linux-converged-for-old-kernels/fs/cifs/link.c
   branches/linux-converged-for-old-kernels/fs/cifs/sess.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24	2006-08-18 23:36:23 UTC (rev 74)
+++ branches/linux-converged-for-old-kernels/fs/cifs/Makefile-24	2006-08-21 17:08:04 UTC (rev 75)
@@ -3,7 +3,7 @@
 #
 O_TARGET := cifs.o
 
-obj-y := nterr.o md4.o md5.o netmisc.o smbdes.o smbencrypt.o asn1.o cifs_unicode.o cifsencrypt.o cifs_debug.o sess.o cifssmb.o connect.o misc.o dir.o inode.o link.o transport.o cifsfs.o file.o
+obj-y := nterr.o md4.o md5.o netmisc.o smbdes.o smbencrypt.o asn1.o cifs_unicode.o cifsencrypt.o cifs_debug.o sess.o link.o cifssmb.o connect.o misc.o dir.o inode.o transport.o cifsfs.o file.o
 
 obj-m := $(O_TARGET)
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c	2006-08-18 23:36:23 UTC (rev 74)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c	2006-08-21 17:08:04 UTC (rev 75)
@@ -136,12 +136,17 @@
 			while(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
 				int timeout = 10 * HZ;
-				while ((tcon->ses->server->tcpStatus != CifsGood) && (timeout > 0)) {
-					timeout = interruptible_sleep_on_timeout(&tcon->ses->server->response_q,timeout);
+				while((tcon->ses->server->tcpStatus != CifsGood)
+						&& (timeout > 0)) {
+					timeout = interruptible_sleep_on_timeout(
+						&tcon->ses->server->response_q,
+						timeout);
 				}
 #else
-				wait_event_interruptible_timeout(tcon->ses->server->response_q,
-					(tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
+				wait_event_interruptible_timeout(
+					tcon->ses->server->response_q,
+					(tcon->ses->server->tcpStatus == CifsGood),
+					10 * HZ);
 #endif
 				if(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
 					/* on "soft" mounts we wait once */
@@ -277,8 +282,20 @@
 				   reconnect, should be greater than cifs socket
 				   timeout which is 7 seconds */
 			while(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
-				wait_event_interruptible_timeout(tcon->ses->server->response_q,
-					(tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
+				int timeout = 10 * HZ;
+				while((tcon->ses->server->tcpStatus != CifsGood)
+						&& (timeout > 0)) {
+					timeout = interruptible_sleep_on_timeout
+						(&tcon->ses->server->response_q,
+						 timeout);
+				}
+#else
+				wait_event_interruptible_timeout(
+					tcon->ses->server->response_q,
+					(tcon->ses->server->tcpStatus == CifsGood),
+					10 * HZ);
+#endif
 				if(tcon->ses->server->tcpStatus == 
 						CifsNeedReconnect) {
 					/* on "soft" mounts we wait once */

Modified: branches/linux-converged-for-old-kernels/fs/cifs/dir.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/dir.c	2006-08-18 23:36:23 UTC (rev 74)
+++ branches/linux-converged-for-old-kernels/fs/cifs/dir.c	2006-08-21 17:08:04 UTC (rev 75)
@@ -139,10 +139,12 @@
 	char *full_path = NULL;
 	FILE_ALL_INFO * buf = NULL;
 	struct inode *newinode = NULL;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
 	struct cifsFileInfo * pCifsFile = NULL;
 	struct cifsInodeInfo * pCifsInode;
+	int write_only = FALSE;
+#endif
 	int disposition = FILE_OVERWRITE_IF;
-	int write_only = FALSE;
 
 	xid = GetXid();
 
@@ -314,19 +316,24 @@
 			}
 			write_unlock(&GlobalSMBSeslock);
 		}
+	}
+cifs_create_out:
 #else /* 2.4 does not pass open flags so must reopen on cifs_open */
 		CIFSSMBClose(xid, pTcon, fileHandle);
+	}
 #endif
-	} 
-cifs_create_out:
 	kfree(buf);
 	kfree(full_path);
 	FreeXid(xid);
 	return rc;
 }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
 int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, 
-		dev_t device_number) 
+		dev_t device_number)
+#else
+int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, int device_number)
+#endif
 {
 	int rc = -EPERM;
 	int xid;
@@ -447,9 +454,13 @@
 	return rc;
 }
 
-
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
 struct dentry *
 cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, struct nameidata *nd)
+#else
+struct dentry *
+cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry)
+#endif
 {
 	int xid;
 	int rc = 0; /* to get around spurious gcc warning, set to zero here */
@@ -543,8 +554,13 @@
 	return ERR_PTR(rc);
 }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
 static int
 cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
+#else
+static int
+cifs_d_revalidate(struct dentry *direntry, int flags)
+#endif
 {
 	int isValid = 1;
 

Modified: branches/linux-converged-for-old-kernels/fs/cifs/link.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/link.c	2006-08-18 23:36:23 UTC (rev 74)
+++ branches/linux-converged-for-old-kernels/fs/cifs/link.c	2006-08-21 17:08:04 UTC (rev 75)
@@ -20,7 +20,10 @@
  */
 #include <linux/fs.h>
 #include <linux/stat.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
 #include <linux/namei.h>
+#endif
 #include "cifsfs.h"
 #include "cifspdu.h"
 #include "cifsglob.h"

Modified: branches/linux-converged-for-old-kernels/fs/cifs/sess.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/sess.c	2006-08-18 23:36:23 UTC (rev 74)
+++ branches/linux-converged-for-old-kernels/fs/cifs/sess.c	2006-08-21 17:08:04 UTC (rev 75)
@@ -21,6 +21,7 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
+#include <linux/fs.h>
 #include "cifspdu.h"
 #include "cifsglob.h"
 #include "cifsproto.h"



More information about the samba-cvs mailing list