Skip to contentSkip to conversation

fix up vfs inode version patch for modules

PATCH In review Eric Sandeen 2 participants 2 messages Nov 28, 2007 – Dec 3, 2007 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix up vfs inode version patch for modules

ext4 calls inode_inc_iversion(), but it's not exported, so modular ext4 has trouble. Any reason not to just make it an inline, as below?

---

fs/inode.c +0 -17
Index: linux-2.6.24-rc1/fs/inode.c
===================================================================
@@ -1243,23 +1243,6 @@ void touch_atime(struct vfsmount *mnt, s
 EXPORT_SYMBOL(touch_atime);
 
 /**
- *     inode_inc_iversion      -       increments i_version
- *     @inode: inode that need to be updated
- *
- *     Every time the inode is modified, the i_version field
- *     will be incremented.
- *     The filesystem has to be mounted with i_version flag
- *
- */
-
-void inode_inc_iversion(struct inode *inode)
-{
-	spin_lock(&inode->i_lock);
-	inode->i_version++;
-	spin_unlock(&inode->i_lock);
-}
-
-/**
  *	file_update_time	-	update mtime and ctime time
  *	@file: file accessed
  *
include/linux/fs.h +15 -1
Index: linux-2.6.24-rc1/include/linux/fs.h
===================================================================
@@ -1396,7 +1396,21 @@ static inline void inode_dec_link_count(
 	mark_inode_dirty(inode);
 }
 
-extern void inode_inc_iversion(struct inode *inode);
+/**
+ * inode_inc_iversion - increments i_version
+ * @inode: inode that need to be updated
+ *
+ * Every time the inode is modified, the i_version field will be incremented.
+ * The filesystem has to be mounted with i_version flag
+ */
+
+static inline void inode_inc_iversion(struct inode *inode)
+{
+       spin_lock(&inode->i_lock);
+       inode->i_version++;
+       spin_unlock(&inode->i_lock);
+}
+
 extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
 static inline void file_accessed(struct file *file)
 {
#1 lore raw
Quoted 3 lines · Eric Sandeen

ext4 calls inode_inc_iversion(), but it's not exported, so modular ext4 has trouble. Any reason not to just make it an inline, as below?

I agree.

Mingming

Quoted 64 lines

---

Index: linux-2.6.24-rc1/fs/inode.c
===================================================================

fs/inode.c +0 -17
@@ -1243,23 +1243,6 @@ void touch_atime(struct vfsmount *mnt, s
 EXPORT_SYMBOL(touch_atime);
 
 /**
- *     inode_inc_iversion      -       increments i_version
- *     @inode: inode that need to be updated
- *
- *     Every time the inode is modified, the i_version field
- *     will be incremented.
- *     The filesystem has to be mounted with i_version flag
- *
- */
-
-void inode_inc_iversion(struct inode *inode)
-{
-	spin_lock(&inode->i_lock);
-	inode->i_version++;
-	spin_unlock(&inode->i_lock);
-}
-
-/**
  *	file_update_time	-	update mtime and ctime time
  *	@file: file accessed
  *

Index: linux-2.6.24-rc1/include/linux/fs.h
===================================================================

include/linux/fs.h +15 -2
@@ -1396,7 +1396,21 @@ static inline void inode_dec_link_count(
 	mark_inode_dirty(inode);
 }
 
-extern void inode_inc_iversion(struct inode *inode);
+/**
+ * inode_inc_iversion - increments i_version
+ * @inode: inode that need to be updated
+ *
+ * Every time the inode is modified, the i_version field will be incremented.
+ * The filesystem has to be mounted with i_version flag
+ */
+
+static inline void inode_inc_iversion(struct inode *inode)
+{
+       spin_lock(&inode->i_lock);
+       inode->i_version++;
+       spin_unlock(&inode->i_lock);
+}
+
 extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry);
 static inline void file_accessed(struct file *file)
 {
 
-

To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html