--- linux/fs/inode.c    Mon Sep 24 00:31:58 2001
+++ linux-2.4.10-preempt/fs/inode.c     Mon Sep 24 01:07:06 2001
@@ -17,6 +17,7 @@
 #include <linux/swapctl.h>
 #include <linux/prefetch.h>
 #include <linux/locks.h>
+#include <linux/compiler.h>

 /*
  * New inode.c implementation.
@@ -296,6 +297,12 @@
                         * so we have to start looking from the list head.
                         */
                        tmp = head;
+
+                        if (unlikely(current->need_resched)) {
+                                spin_unlock(&inode_lock);
+                                schedule();
+                                spin_lock(&inode_lock);
+                        }
                }
        }
