From b8aab015cd2af37c45d95967de1122825ce4d90d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Mon, 14 Jun 2010 16:39:26 -0700 Subject: [PATCH] yaffs: Fix yaffs_sync_object for 2.6.35 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Idfab44338022238d13f9ae67fc8448373c5edce5 Signed-off-by: Arve Hjønnevåg --- fs/yaffs2/yaffs_fs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c index 6eb356c81e6e..b1d87b6d50c1 100644 --- a/fs/yaffs2/yaffs_fs.c +++ b/fs/yaffs2/yaffs_fs.c @@ -202,8 +202,12 @@ static int yaffs_file_flush(struct file *file, fl_owner_t id); static int yaffs_file_flush(struct file *file); #endif +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34)) +static int yaffs_sync_object(struct file *file, int datasync); +#else static int yaffs_sync_object(struct file *file, struct dentry *dentry, int datasync); +#endif static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir); @@ -1715,12 +1719,19 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry, return -ENOMEM; } +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34)) +static int yaffs_sync_object(struct file *file, int datasync) +#else static int yaffs_sync_object(struct file *file, struct dentry *dentry, int datasync) +#endif { yaffs_Object *obj; yaffs_Device *dev; +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34)) + struct dentry *dentry = file->f_path.dentry; +#endif obj = yaffs_DentryToObject(dentry); -- 2.34.1