diff -Nru linux-2.4.20-pre10-mjc1/drivers/block/ll_rw_blk.c linux-2.4.20-pre10-mjc2/drivers/block/ll_rw_blk.c
--- linux-2.4.20-pre10-mjc1/drivers/block/ll_rw_blk.c	2002-10-23 22:55:40.000000000 -0400
+++ linux-2.4.20-pre10-mjc2/drivers/block/ll_rw_blk.c	2002-10-25 00:07:21.000000000 -0400
@@ -1247,6 +1247,7 @@
 			kstat.pgpgin += count;
 			break;
 	}
+	cond_resched();
 }
 
 /**
diff -Nru linux-2.4.20-pre10-mjc1/fs/buffer.c linux-2.4.20-pre10-mjc2/fs/buffer.c
--- linux-2.4.20-pre10-mjc1/fs/buffer.c	2002-10-23 22:55:49.000000000 -0400
+++ linux-2.4.20-pre10-mjc2/fs/buffer.c	2002-10-25 00:08:50.000000000 -0400
@@ -258,6 +258,8 @@
 				continue;
 
 			spin_unlock(&lru_list_lock);
+			cond_resched();
+
 			write_locked_buffers(array, count);
 			return -EAGAIN;
 		}
@@ -265,6 +267,7 @@
 		__refile_buffer(bh);
 	}
 	spin_unlock(&lru_list_lock);
+	cond_resched();
 
 	if (count)
 		write_locked_buffers(array, count);
@@ -310,17 +313,19 @@
 		spin_unlock(&lru_list_lock);
 		wait_on_buffer (bh);
 		put_bh(bh);
+		cond_resched();
 		return -EAGAIN;
 	}
 	spin_unlock(&lru_list_lock);
+	cond_resched();
 	return 0;
 }
 
 static int wait_for_locked_buffers(kdev_t dev, int index, int refile)
 {
-	do {
+	do
 		spin_lock(&lru_list_lock);
-	} while (wait_for_buffers(dev, index, refile));
+	while (wait_for_buffers(dev, index, refile));
 	return 0;
 }
 
@@ -1021,6 +1026,7 @@
 	for (;;) {
 		struct buffer_head * bh;
 
+		cond_resched();
 		bh = get_hash_table(dev, block, size);
 		if (bh)
 			return bh;
@@ -1187,8 +1193,10 @@
 
 	bh = getblk(dev, block, size);
 	touch_buffer(bh);
-	if (buffer_uptodate(bh))
+	if (buffer_uptodate(bh)) {
+		cond_resched();
 		return bh;
+	}
 	ll_rw_block(READ, 1, &bh);
 	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
diff -Nru linux-2.4.20-pre10-mjc1/fs/dcache.c linux-2.4.20-pre10-mjc2/fs/dcache.c
--- linux-2.4.20-pre10-mjc1/fs/dcache.c	2002-10-23 22:55:30.000000000 -0400
+++ linux-2.4.20-pre10-mjc2/fs/dcache.c	2002-10-25 00:07:21.000000000 -0400
@@ -71,7 +71,7 @@
  * d_iput() operation if defined.
  * Called with dcache_lock held, drops it.
  */
-static inline void dentry_iput(struct dentry * dentry)
+static void dentry_iput(struct dentry * dentry)
 {
 	struct inode *inode = dentry->d_inode;
 	if (inode) {
@@ -84,6 +84,7 @@
 			iput(inode);
 	} else
 		spin_unlock(&dcache_lock);
+	cond_resched();
 }
 
 /* 
diff -Nru linux-2.4.20-pre10-mjc1/fs/jbd/commit.c linux-2.4.20-pre10-mjc2/fs/jbd/commit.c
--- linux-2.4.20-pre10-mjc1/fs/jbd/commit.c	2002-10-23 22:55:41.000000000 -0400
+++ linux-2.4.20-pre10-mjc2/fs/jbd/commit.c	2002-10-25 00:07:21.000000000 -0400
@@ -212,6 +212,16 @@
 				__journal_remove_journal_head(bh);
 				refile_buffer(bh);
 				__brelse(bh);
+				if (current->need_resched) {
+					if (commit_transaction->t_sync_datalist)
+						commit_transaction->t_sync_datalist =
+							next_jh;
+					if (bufs)
+						break;
+					spin_unlock(&journal_datalist_lock);
+					cond_resched();
+					goto write_out_data;
+				}
 			}
 		}
 		if (bufs == ARRAY_SIZE(wbuf)) {
diff -Nru linux-2.4.20-pre10-mjc1/fs/proc/array.c linux-2.4.20-pre10-mjc2/fs/proc/array.c
--- linux-2.4.20-pre10-mjc1/fs/proc/array.c	2002-10-23 22:55:41.000000000 -0400
+++ linux-2.4.20-pre10-mjc2/fs/proc/array.c	2002-10-25 00:07:21.000000000 -0400
@@ -419,6 +419,8 @@
 		pte_t page = *pte;
 		struct page *ptpage;
 
+		cond_resched();
+
 		address += PAGE_SIZE;
 		pte++;
 		if (pte_none(page))
diff -Nru linux-2.4.20-pre10-mjc1/fs/proc/generic.c linux-2.4.20-pre10-mjc2/fs/proc/generic.c
--- linux-2.4.20-pre10-mjc1/fs/proc/generic.c	2002-08-02 20:39:45.000000000 -0400
+++ linux-2.4.20-pre10-mjc2/fs/proc/generic.c	2002-10-25 00:07:21.000000000 -0400
@@ -98,7 +98,9 @@
 				retval = n;
 			break;
 		}
-		
+
+		cond_resched();
+
 		/* This is a hack to allow mangling of file pos independent
  		 * of actual bytes read.  Simply place the data at page,
  		 * return the bytes, and set `start' to the desired offset
diff -Nru linux-2.4.20-pre10-mjc1/mm/filemap.c linux-2.4.20-pre10-mjc2/mm/filemap.c
--- linux-2.4.20-pre10-mjc1/mm/filemap.c	2002-10-24 23:59:08.000000000 -0400
+++ linux-2.4.20-pre10-mjc2/mm/filemap.c	2002-10-25 00:07:21.000000000 -0400
@@ -304,11 +304,7 @@
 
 			page_cache_release(page);
 
-			if (current->need_resched) {
-				__set_current_state(TASK_RUNNING);
-				schedule();
-			}
-
+			cond_resched();
 			spin_lock(&pagecache_lock);
 			goto restart;
 		}
@@ -414,11 +410,8 @@
 		}
 
 		page_cache_release(page);
-		if (current->need_resched) {
-			__set_current_state(TASK_RUNNING);
-			schedule();
-		}
 
+		cond_resched();
 		spin_lock(&pagecache_lock);
 		goto restart;
 	}
@@ -586,6 +579,7 @@
 			UnlockPage(page);
 
 		page_cache_release(page);
+		cond_resched();
 		spin_lock(&pagecache_lock);
 	}
 	spin_unlock(&pagecache_lock);
@@ -708,6 +702,8 @@
 	struct page **hash = page_hash(mapping, offset);
 	struct page *page; 
 
+	cond_resched();
+
 	spin_lock(&pagecache_lock);
 	page = __find_page_nolock(mapping, offset, *hash);
 	spin_unlock(&pagecache_lock);
@@ -1597,6 +1593,9 @@
 		offset &= ~PAGE_CACHE_MASK;
 
 		page_cache_release(page);
+
+		cond_resched();
+
 		if (ret == nr && desc->count)
 			continue;
 		break;
@@ -3282,6 +3281,8 @@
 			mark_page_accessed(page);
 		page_cache_release(page);
 
+		cond_resched();
+
 		if (status < 0)
 			break;
 	} while (count);
