mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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/[email protected] Signed-off-by: Hou Tao <[email protected]> Acked-by: OGAWA Hirofumi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
660c9fc72e
commit
67ceb1eca0
1 changed files with 1 additions and 0 deletions
|
|
@ -214,6 +214,7 @@ const struct file_operations fat_file_operations = {
|
|||
#endif
|
||||
.fsync = fat_file_fsync,
|
||||
.splice_read = generic_file_splice_read,
|
||||
.splice_write = iter_file_splice_write,
|
||||
.fallocate = fat_fallocate,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue