2
0

504-yaffs-3.16-new-fops.patch 807 B

12345678910111213141516171819202122232425
  1. --- a/fs/yaffs2/yaffs_vfs.c
  2. +++ b/fs/yaffs2/yaffs_vfs.c
  3. @@ -774,7 +774,21 @@ static int yaffs_sync_object(struct file
  4. }
  5. -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
  6. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0))
  7. +static const struct file_operations yaffs_file_operations = {
  8. + .read = new_sync_read,
  9. + .read_iter = generic_file_read_iter,
  10. + .write = new_sync_write,
  11. + .write_iter = generic_file_write_iter,
  12. + .mmap = generic_file_mmap,
  13. + .flush = yaffs_file_flush,
  14. + .fsync = yaffs_sync_object,
  15. + .splice_read = generic_file_splice_read,
  16. + .splice_write = iter_file_splice_write,
  17. + .llseek = generic_file_llseek,
  18. +};
  19. +
  20. +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
  21. static const struct file_operations yaffs_file_operations = {
  22. .read = do_sync_read,
  23. .write = do_sync_write,