The patch titled Subject: fat: enable .splice_write to support splice on O_DIRECT file has been added to the -mm tree. Its filename is fat-enable-splice_write-to-support-splice-on-o_direct-file.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/fat-enable-splice_write-to-support-splice-on-o_direct-file.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/fat-enable-splice_write-to-support-splice-on-o_direct-file.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Hou Tao <houtao1@xxxxxxxxxx> Subject: fat: enable .splice_write to support splice on O_DIRECT file Now splice() on O_DIRECT-opened fat file will return -EFAULT, that is because the default .splice_write, namely default_file_splice_write(), will construct an ITER_KVEC iov_iter and dio_refill_pages() in dio path can not handle it. Fix it by implementing .splice_write through iter_file_splice_write(). Spotted by xfs-tests generic/091. Link: http://lkml.kernel.org/r/20190210094754.56355-1-houtao1@xxxxxxxxxx Signed-off-by: Hou Tao <houtao1@xxxxxxxxxx> Acked-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/fat/file.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/fat/file.c~fat-enable-splice_write-to-support-splice-on-o_direct-file +++ a/fs/fat/file.c @@ -214,6 +214,7 @@ const struct file_operations fat_file_op #endif .fsync = fat_file_fsync, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .fallocate = fat_fallocate, }; _ Patches currently in -mm which might be from houtao1@xxxxxxxxxx are fat-enable-splice_write-to-support-splice-on-o_direct-file.patch