Whamcloud - gitweb
b=13620
authoralex <alex>
Wed, 17 Oct 2007 19:02:48 +0000 (19:02 +0000)
committeralex <alex>
Wed, 17 Oct 2007 19:02:48 +0000 (19:02 +0000)
i=adilger

 - patch to rhel4 series: keep inode hashed over clear_inode() call

lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch [new file with mode: 0644]
lustre/kernel_patches/series/2.6-rhel4.series

diff --git a/lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch b/lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch
new file mode 100644 (file)
index 0000000..86764a4
--- /dev/null
@@ -0,0 +1,32 @@
+--- a/fs/inode.c.orig  2007-10-01 16:42:24.567821866 +0100
++++ b/fs/inode.c       2007-10-01 16:43:30.022037788 +0100
+@@ -288,6 +288,12 @@
+               if (inode->i_data.nrpages)
+                       truncate_inode_pages(&inode->i_data, 0);
+               clear_inode(inode);
++
++              spin_lock(&inode_lock);
++              hlist_del_init(&inode->i_hash);
++              spin_unlock(&inode_lock);
++
++              wake_up_inode(inode);
+               destroy_inode(inode);
+               nr_disposed++;
+       }
+@@ -317,7 +323,6 @@
+                       continue;
+               invalidate_inode_buffers(inode);
+               if (!atomic_read(&inode->i_count)) {
+-                      hlist_del_init(&inode->i_hash);
+                       list_move(&inode->i_list, dispose);
+                       inode->i_state |= I_FREEING;
+                       count++;
+@@ -455,7 +460,6 @@
+                       if (!can_unuse(inode))
+                               continue;
+               }
+-              hlist_del_init(&inode->i_hash);
+               list_move(&inode->i_list, &freeable);
+               inode->i_state |= I_FREEING;
+               nr_pruned++;
+
index e725571..a9ee4e7 100644 (file)
@@ -29,3 +29,4 @@ quota-umount-race-fix.patch
 quota-deadlock-on-pagelock-ext3.patch
 dynamic-locks-2.6.9.patch
 export-nr_free_buffer_pages.patch
+vfs-keep-inode-hashed-for-clear-inode.patch