[Yaffs] [PATCH] fix yaffs_writepage()

Top Page
Attachments:
Message as email
+ (text/plain)
+ 14-adapt-yaffs_writepage-for-2.6.diff (text/plain)
Delete this message
Reply to this message
Author: Luc Van Oostenryck
Date:  
To: yaffs
Subject: [Yaffs] [PATCH] fix yaffs_writepage()
Adapt yaffs_writepage() for Linux-2.6 (add struct writeback_control argument).
diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c
--- a/fs/yaffs2/yaffs_fs.c
+++ b/fs/yaffs2/yaffs_fs.c
@@ -165,7 +165,11 @@ static void yaffs_delete_inode(struct in
static void yaffs_clear_inode(struct inode *);

static int yaffs_readpage(struct file *file, struct page * page);
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+static int yaffs_writepage(struct page *page, struct writeback_control *wbc);
+#else
static int yaffs_writepage(struct page *page);
+#endif
static int yaffs_prepare_write(struct file *f, struct page *pg, unsigned offset, unsigned to);
static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset, unsigned to);

@@ -507,7 +511,11 @@ static int yaffs_readpage(struct file *f
// writepage inspired by/stolen from smbfs
//

+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+static int yaffs_writepage(struct page *page, struct writeback_control *wbc)
+#else
 static int yaffs_writepage(struct page *page)
+#endif
 {
     struct address_space *mapping = page->mapping;
     struct inode *inode;