[Ocfs2-devel] [PATCH]2.6 fixes in io.c
Rusty Lynch
rusty at linux.co.intel.com
Thu Feb 19 20:13:29 CST 2004
The following patch ports io.c to a 2.6 kernel by replacing
mark_buffer_clean() calls with clear_buffer_dirty(). As I
commented below, I'm not sure this is the correct thing to
do.
--rusty
Index: src/io.c
===================================================================
--- src/io.c (revision 32)
+++ src/io.c (working copy)
@@ -277,7 +277,17 @@
set_buffer_uptodate(bh);
/* remove from dirty list before I/O. */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ /*
+ * mark_buffer_clean() doesn't exist in 2.6.x kernels.
+ * Not many places actually used mark_buffer_clean, but
+ * at least reiserfs uses clear_buffer_dirty() as
+ * a replacment.
+ */
+ clear_buffer_dirty(bh);
+#else
mark_buffer_clean(bh);
+#endif
bh->b_end_io = ocfs_end_buffer_io_sync;
submit_bh(WRITE, bh);
@@ -550,7 +560,17 @@
set_buffer_uptodate(bh);
/* remove from dirty list before I/O. */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ /*
+ * mark_buffer_clean() doesn't exist in 2.6.x kernels.
+ * Not many places actually used mark_buffer_clean, but
+ * at least reiserfs uses clear_buffer_dirty() as
+ * a replacment.
+ */
+ clear_buffer_dirty(bh);
+#else
mark_buffer_clean(bh);
+#endif
bh->b_end_io = ocfs_end_buffer_io_sync;
submit_bh(WRITE, bh);
More information about the Ocfs2-devel
mailing list