| 1 | --- a/fs/yaffs2/yaffs_vfs_glue.c |
| 2 | +++ b/fs/yaffs2/yaffs_vfs_glue.c |
| 3 | @@ -271,20 +271,29 @@ static int yaffs_sync_object(struct file |
| 4 | |
| 5 | static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir); |
| 6 | |
| 7 | -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 8 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 9 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) |
| 10 | +static int yaffs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 11 | + bool excl); |
| 12 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 13 | static int yaffs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 14 | struct nameidata *n); |
| 15 | -#else |
| 16 | +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 17 | static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode, |
| 18 | struct nameidata *n); |
| 19 | +#else |
| 20 | +static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode); |
| 21 | #endif |
| 22 | + |
| 23 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) |
| 24 | +static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry, |
| 25 | + unsigned int flags); |
| 26 | +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 27 | static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry, |
| 28 | struct nameidata *n); |
| 29 | #else |
| 30 | -static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode); |
| 31 | static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry); |
| 32 | #endif |
| 33 | + |
| 34 | static int yaffs_link(struct dentry *old_dentry, struct inode *dir, |
| 35 | struct dentry *dentry); |
| 36 | static int yaffs_unlink(struct inode *dir, struct dentry *dentry); |
| 37 | @@ -837,7 +846,10 @@ struct inode *yaffs_get_inode(struct sup |
| 38 | /* |
| 39 | * Lookup is used to find objects in the fs |
| 40 | */ |
| 41 | -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 42 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) |
| 43 | +static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry, |
| 44 | + unsigned int flags) |
| 45 | +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 46 | |
| 47 | static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry, |
| 48 | struct nameidata *n) |
| 49 | @@ -1827,7 +1839,10 @@ static int yaffs_mkdir(struct inode *dir |
| 50 | return retVal; |
| 51 | } |
| 52 | |
| 53 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 54 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) |
| 55 | +static int yaffs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 56 | + bool excl) |
| 57 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 58 | static int yaffs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 59 | struct nameidata *n) |
| 60 | #elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 61 | |