patch-2.3.99-pre6 linux/fs/buffer.c

Next file: linux/fs/cramfs/inflate/adler32.c
Previous file: linux/fs/block_dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre5/linux/fs/buffer.c linux/fs/buffer.c
@@ -28,6 +28,7 @@
 
 /* async buffer flushing, 1999 Andrea Arcangeli <andrea@suse.de> */
 
+#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/fs.h>
 #include <linux/malloc.h>
@@ -1755,8 +1756,6 @@
 
 	kiobuf = bh->b_kiobuf;
 	unlock_buffer(bh);
-	
-	kiobuf = bh->b_kiobuf;
 	end_kio_request(kiobuf, uptodate);
 }
 
@@ -2192,7 +2191,7 @@
 
 void show_buffers(void)
 {
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 	struct buffer_head * bh;
 	int found = 0, locked = 0, dirty = 0, used = 0, lastused = 0;
 	int protected = 0;
@@ -2203,7 +2202,7 @@
 	printk("Buffer memory:   %6dkB\n",
 			atomic_read(&buffermem_pages) << (PAGE_SHIFT-10));
 
-#ifdef __SMP__ /* trylock does nothing on UP and so we could deadlock */
+#ifdef CONFIG_SMP /* trylock does nothing on UP and so we could deadlock */
 	if (!spin_trylock(&lru_list_lock))
 		return;
 	for(nlist = 0; nlist < NR_LIST; nlist++) {
@@ -2412,6 +2411,12 @@
 
 	flush_dirty_buffers(1);
 	/* must really sync all the active I/O request to disk here */
+	run_task_queue(&tq_disk);
+	return 0;
+}
+
+int block_sync_page(struct page *page)
+{
 	run_task_queue(&tq_disk);
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)