[Yaffs] [PATCH] fix yaffs_writepage()

Luc Van Oostenryck lkml at looxix.net
Tue Jul 19 01:50:46 BST 2005


  Adapt yaffs_writepage() for Linux-2.6 (add struct writeback_control argument).
-------------- next part --------------
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;


More information about the yaffs mailing list