From: Arve Hjønnevåg Date: Mon, 14 Jun 2010 23:39:26 +0000 (-0700) Subject: yaffs: Fix yaffs_sync_object for 2.6.35 X-Git-Tag: firefly_0821_release~9833^2~5^2~277 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b8aab015cd2af37c45d95967de1122825ce4d90d;p=firefly-linux-kernel-4.4.55.git yaffs: Fix yaffs_sync_object for 2.6.35 Change-Id: Idfab44338022238d13f9ae67fc8448373c5edce5 Signed-off-by: Arve Hjønnevåg --- 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);