512-yaffs-3.6-fix-dir_inode-ops.patch 2.5 KB

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