fix
authorMiklos Szeredi <miklos@szeredi.hu>
Sun, 18 Jul 2004 11:32:59 +0000 (11:32 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Sun, 18 Jul 2004 11:32:59 +0000 (11:32 +0000)
ChangeLog
kernel/file.c

index dc31a7030857cb8a2e8a48e795a86eafa1f4b29d..12a1a251b33649403b9605d5fb153c3619989512 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-07-18  Miklos Szeredi <miklos@szeredi.hu>
+
+       * Only use redirty_page_for_writepage() for kernels >= 2.6.6
+       
 2004-07-16  Miklos Szeredi <miklos@szeredi.hu>
 
        * Separate directory entry and inode attribute validity timer
index 2a6fb4b025dfac56e68dc49dac0f11ffa6d36311..a82c3269e26f90e877615825399d7cd5f791a654 100644 (file)
@@ -610,7 +610,11 @@ static int fuse_writepage(struct page *page, struct writeback_control *wbc)
        if (wbc->nonblocking) {
                err = write_page_nonblock(inode, page);
                if (err == -EWOULDBLOCK) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6)
                        redirty_page_for_writepage(wbc, page);
+#else
+                       __set_page_dirty_nobuffers(page);
+#endif
                        err = 0;
                }
        } else
@@ -753,12 +757,12 @@ static struct file_operations fuse_file_operations = {
 };
 
 static struct address_space_operations fuse_file_aops  = {
-       .readpage =             fuse_readpage,
-       .writepage =            fuse_writepage,
-       .prepare_write =        fuse_prepare_write,
-       .commit_write =         fuse_commit_write,
+       .readpage       = fuse_readpage,
+       .writepage      = fuse_writepage,
+       .prepare_write  = fuse_prepare_write,
+       .commit_write   = fuse_commit_write,
 #ifdef KERNEL_2_6
-       .set_page_dirty =       __set_page_dirty_nobuffers,
+       .set_page_dirty = __set_page_dirty_nobuffers,
 #endif
 };