[Ocfs2-commits] manish commits r919 - in trunk/src: . inc

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon May 17 18:18:04 CDT 2004


Author: manish
Date: 2004-05-17 17:18:03 -0500 (Mon, 17 May 2004)
New Revision: 919

Modified:
   trunk/src/inc/ocfs.h
   trunk/src/inode.c
   trunk/src/super.c
Log:
Remove LinuxVersionCode and use KERNEL_VERSION instead


Modified: trunk/src/inc/ocfs.h
===================================================================
--- trunk/src/inc/ocfs.h	2004-05-17 21:15:17 UTC (rev 918)
+++ trunk/src/inc/ocfs.h	2004-05-17 22:18:03 UTC (rev 919)
@@ -936,11 +936,7 @@
 #include <linux/moduleparam.h>
 #endif
 
-/* Module versioning */
-#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
-
-
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
 #define free_kiovec_sz(nr, buf, bh)     free_kiovec(nr, buf)
 #define alloc_kiovec_sz(nr, buf, bh)    alloc_kiovec(nr, buf)
 #endif

Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c	2004-05-17 21:15:17 UTC (rev 918)
+++ trunk/src/inode.c	2004-05-17 22:18:03 UTC (rev 919)
@@ -70,7 +70,7 @@
 	.prepare_write = ocfs_prepare_write,
 	.bmap = ocfs_bmap,
 	.commit_write = ocfs_commit_write,
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,10)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10)
 /*
  * On a 2.4 system, we are only adding this here as a dummy basically, 
  * just need open with O_DIRECT to succeed, we still call ocfs_rw_direct().
@@ -268,7 +268,7 @@
  * not found? : get_new_inode -> OCFS_READ_INODE2
  */
 
-#if LINUX_VERSION_CODE < LinuxVersionCode(2,5,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 
 /*
  * ocfs_find_inode()
@@ -305,7 +305,7 @@
 	LOG_EXIT_INT (ret);
 	return ret;
 }				/* ocfs_find_inode */
-#endif /* LINUX_VERSION_CODE < LinuxVersionCode(2,5,0) */
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
 
 /*
  * ocfs_inode_init_private()
@@ -1231,7 +1231,7 @@
 	return ret;
 }				/* ocfs_direct_IO */
 
-#elif LINUX_VERSION_CODE >= LinuxVersionCode(2,4,10)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10)
 /*
  * ocfs_direct_IO()
  *
@@ -1239,7 +1239,7 @@
  * we should never get here any more
  * so let's just BUG(), hint from sct at redhat.com
  */
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,20) || defined(SUSE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) || defined(SUSE)
 static int ocfs_direct_IO (int rw, struct file *filp, struct kiobuf *iobuf, unsigned long blocknr, int blocksize)
 {
 	BUG();
@@ -1254,15 +1254,15 @@
 #endif
 #endif  /* version >= 2.4.10 */
 
-#if defined(SUSE) && LINUX_VERSION_CODE < LinuxVersionCode(2,4,20)
+#if defined(SUSE) && LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)
 #define OCFS_KIO_BLOCKS(_iobuf)  ((_iobuf)->kio_blocks)
 #else
 #define OCFS_KIO_BLOCKS(_iobuf)  ((_iobuf)->blocks)
 #endif
 
-#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,10)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,10)
 #define KERNEL_NO_F_IOBUF 1
-#elif defined(SUSE) && LINUX_VERSION_CODE >= LinuxVersionCode(2,4,20)
+#elif defined(SUSE) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20)
 #define KERNEL_NO_F_IOBUF 1
 #endif
 

Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c	2004-05-17 21:15:17 UTC (rev 918)
+++ trunk/src/super.c	2004-05-17 22:18:03 UTC (rev 919)
@@ -169,7 +169,7 @@
 	/* TODO: fix this */
 	sb->s_blocksize = blksize;
 	sb->s_blocksize_bits = blksize_bits;
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
 	status = set_blocksize (sb->s_dev, blksize);
 #else
 	set_blocksize (sb->s_dev, blksize);



More information about the Ocfs2-commits mailing list