[Ocfs2-commits] manish commits r948 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed May 26 21:54:23 CDT 2004


Author: manish
Date: 2004-05-26 20:54:21 -0500 (Wed, 26 May 2004)
New Revision: 948

Modified:
   trunk/src/inode.c
   trunk/src/namei.c
Log:
i_version changes for 2.6


Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c	2004-05-27 01:53:36 UTC (rev 947)
+++ trunk/src/inode.c	2004-05-27 01:54:21 UTC (rev 948)
@@ -367,7 +367,11 @@
 			      "inode");
 		goto bail;
 	}
-	
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+	inode->i_version = 1;
+#endif
+
 	inode->i_rdev = MKDEV (fe->dev_major, fe->dev_minor);
 	inode->i_mode = mode;
 	inode->i_uid = fe->uid;
@@ -1766,9 +1770,6 @@
 	int status = 0;
 	struct buffer_head *fe_bh = NULL;
 	ocfs_file_entry *fe = NULL;
-	struct list_head *iter;
-	struct list_head *temp_iter;
-	int disk_len;
 	__u64 offset;
 
 	/* We are setting the oin Updated flag in the end. */

Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c	2004-05-27 01:53:36 UTC (rev 947)
+++ trunk/src/namei.c	2004-05-27 01:54:21 UTC (rev 948)
@@ -1127,7 +1127,11 @@
 		OCFS_BH_GET_DATA_WRITE(new_de_bh); /* write */
 		new_de->inode = le64_to_cpu(GET_INODE_FEOFF(old_inode));
 		new_de->file_type = old_de->file_type;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+		new_dir->i_version++;
+#else
 		new_dir->i_version = ++event;
+#endif
 		OCFS_BH_PUT_DATA(new_de_bh);
 		status = ocfs_journal_dirty(handle, new_de_bh);
 		if (status < 0) {
@@ -1545,7 +1549,11 @@
 			buf = NULL;
 
 			dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+			dir->i_version++;
+#else
 			dir->i_version = ++event;
+#endif
 			status = ocfs_journal_dirty(handle, bh);
 			retval = 0;
 			goto bail;
@@ -1598,7 +1606,11 @@
 			else
 				de->inode = 0;
 			OCFS_BH_PUT_DATA(bh);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+			dir->i_version++;
+#else
 			dir->i_version = ++event;
+#endif
 			status = ocfs_journal_dirty(handle, bh);
 			goto bail;
 		}



More information about the Ocfs2-commits mailing list