yaffs: Fix yaffs_sync_object for 2.6.35
authorArve Hjønnevåg <arve@android.com>
Mon, 14 Jun 2010 23:39:26 +0000 (16:39 -0700)
committerColin Cross <ccross@android.com>
Thu, 30 Sep 2010 00:49:17 +0000 (17:49 -0700)
Change-Id: Idfab44338022238d13f9ae67fc8448373c5edce5
Signed-off-by: Arve Hjønnevåg <arve@android.com>
fs/yaffs2/yaffs_fs.c

index 6eb356c81e6e4276c0ca88813e7b83082b788bd9..b1d87b6d50c1f90fd664270a2f95a44e17039512 100644 (file)
@@ -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);