mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
vfs: pass a flags argument to vfs_readv/vfs_writev
This way we can set kiocb flags also from the sync read/write path for the read_iter/write_iter operations. For now there is no way to pass flags to plain read/write operations as there is no real need for that, and all flags passed are explicitly rejected for these files. Signed-off-by: Milosz Tanski <[email protected]> [hch: rebased on top of my kiocb changes] Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Stephen Bates <[email protected]> Tested-by: Stephen Bates <[email protected]> Acked-by: Jeff Moyer <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
92e963f50f
commit
793b80ef14
4 changed files with 31 additions and 23 deletions
|
|
@ -577,7 +577,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
|
|||
old_fs = get_fs();
|
||||
set_fs(get_ds());
|
||||
/* The cast to a user pointer is valid due to the set_fs() */
|
||||
res = vfs_readv(file, (const struct iovec __user *)vec, vlen, &pos);
|
||||
res = vfs_readv(file, (const struct iovec __user *)vec, vlen, &pos, 0);
|
||||
set_fs(old_fs);
|
||||
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Reference in a new issue